Distributed application using diagnostic heartbeating

ABSTRACT

A method, system, and computer program product for improving a distributed application using diagnostic heartbeating are provided in the illustrative embodiments. An application, executing using a processor and a memory in a first data processing system, sends a registration to a component in the first data processing system. The registration requests state information for a set of member components in a distributed domain. After the application sends the registration to the component, the application receives the state information from the component. The state information includes current status and diagnostic information relating to the set of member components obtained from diagnostic attributes of diagnostic heartbeat packets received by the component. A diagnostic heartbeat packet is a packet comprising a header, a set of heartbeat parameters, and a set of diagnostic attributes.

TECHNICAL FIELD

The present invention relates generally to a method, system, andcomputer program product for a reliable data communication system.Particularly, the present invention relates to a method, system, andcomputer program product for improving a distributed application usingdiagnostic heartbeating.

BACKGROUND

A reliable peer-to-peer communication system is a communication systemin a distributed data processing environment that provides reliable datacommunication services. Distributed applications, such as instances of adistributable application executing on different nodes or machines of adata processing environment, utilize these data communication servicesfor providing their functionality. Client systems, such as anapplication that is a client of a distributed application instance, alsoinherently depend on these data communication services to accomplishtheir desired functions with the distributed applications.

For example, reliable data communication services include functionscommonly required by distributed applications, such as reliable messagedelivery to all members of a domain, global in-order delivery ofmessages or sequences of messages, and synchronization barriers. Suchservices are used by currently available distributed applications.

A domain is a collection or a set of data processing systems connectedby a network, data bus and/or shared memory or storage that participatein a given distributed data processing environment. For example, a dataprocessing environment may include five computers, three of which mayhost instances of a distributed application. The three computers, alsoknown as hosts or nodes, which host the distributed applicationinstances, form a domain that has to provide the aforementioned reliabledata communication services.

A barrier is a type of synchronization method. A barrier for a group ofthreads or processes is a stopping point where the threads or processessubject to the barrier must stop executing to allow other threads orprocesses to catch-up or synchronize at the barrier, before the threadsor processes can resume executing. Various nodes in a domain, anddistributed application instances executing thereon, have to remainsynchronized with each other to provide their functions in a consistentmanner. In some cases, additional functions, such as multi-phaseprotocols with global barriers, zoning (creation of sub-domains) anddistributed locking may be offered by data communication services in adistributed data processing environment to satisfy the synchronizationneeds of the distributed applications.

Reliable peer-to-peer communication is a type of distributed datacommunication service in a distributed data processing environment thatseeks to provide a threshold level of reliability in message deliverybetween the peer nodes in the distributed data processing environment.Many distributed applications use reliable peer-to-peer communication toprovide a particular level of performance, functionality, stability, orsecurity.

For example, distributed transaction systems require reliablepeer-to-peer communication to ensure transaction integrity. As anotherexample, distributed databases and distributed file systems requirereliable peer-to-peer communication to ensure data consistency acrossthe various data instances or partitions. Clusters of data processingsystems in high availability (HA) data processing environments rely onsuch peer-to-peer communications to maintain the desired level of systemavailability, load balancing and system performance. Logistics,telecommunication, and industrial control systems are some examples oftypes of distributed applications, which require reliable peer-to-peercommunication services for ensuring a reliable delivery of theirrespective functionalities.

SUMMARY

The illustrative embodiments provide a method, system, and computerprogram product for improving a distributed application using diagnosticheartbeating. In at least one embodiment, a method for improving adistributed application using diagnostic heartbeating is provided. Themethod includes an application, executing using a processor and a memoryin a first data processing system, sending a registration to a componentin the first data processing system, the registration requesting stateinformation for a set of member components in a distributed domain. Themethod further includes, after the application sending the registrationto the component, the application receiving the state information fromthe component, the state information including current status anddiagnostic information relating to the set of member components obtainedfrom diagnostic attributes of diagnostic heartbeat packets received bythe component. A diagnostic heartbeat packet is a packet comprising aheader, a set of heartbeat parameters, and a set of diagnosticattributes.

In at least one embodiment, a computer program product for improving adistributed application using diagnostic heartbeating is provided. Thecomputer program product includes one or more computer-readable tangiblestorage devices. The computer program product further includes programinstructions, stored on at least one of the one or more storage devices,to send a registration from an application to a component in a firstdata processing system, the registration requesting state informationfor a set of member components in a distributed domain. The computerprogram product further includes program instructions, stored on atleast one of the one or more storage devices, to receive the stateinformation at the application from the component, the state informationincluding current status and diagnostic information relating to the setof member components obtained from diagnostic attributes of diagnosticheartbeat packets received by the component. A diagnostic heartbeatpacket is a packet comprising a header, a set of heartbeat parameters,and a set of diagnostic attributes.

In at least one embodiment, a computer system for improving adistributed application using diagnostic heartbeating is provided. Thecomputer system includes one or more processors, one or morecomputer-readable memories, and one or more computer-readable tangiblestorage devices. The computer system further includes programinstructions, stored on at least one of the one or more storage devicesfor execution by at least one of the one or more processors via at leastone of the one or more memories, to send a registration from anapplication to a component in the computer system, the registrationrequesting state information for a set of member components in adistributed domain. The computer system further includes programinstructions, stored on at least one of the one or more storage devices,to receive the state information at the application from the component,the state information including current status and diagnosticinformation relating to the set of member components obtained fromdiagnostic attributes of diagnostic heartbeat packets received by thecomponent. A diagnostic heartbeat packet is a packet comprising aheader, a set of heartbeat parameters, and a set of diagnosticattributes.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofillustrative embodiments when read in conjunction with the accompanyingdrawings, wherein:

FIG. 1 depicts a pictorial representation of a network of dataprocessing systems in which illustrative embodiments may be implemented;

FIG. 2 depicts a block diagram of a data processing system in whichillustrative embodiments may be implemented;

FIG. 3 depicts a block diagram of a generalized reliable peer-to-peercommunication configuration in a distributed data processing system withrespect to which an illustrative embodiment may be implemented;

FIG. 4 depicts a block diagram of the various messaging that depends onthe membership state information in a reliable peer-to-peercommunication system, which can be improved using an illustrativeembodiment;

FIG. 5 depicts a block diagram of conceptual distinctions between abasic heartbeat and a diagnostic heartbeat in accordance with anillustrative embodiment;

FIG. 6 depicts a block diagram of an improved messaging infrastructurefor reliable peer-to-peer communication services in accordance with anillustrative embodiment;

FIG. 7 depicts a block diagram of an improved messaging infrastructurein accordance with an illustrative embodiment;

FIG. 8 depicts a block diagram depicting several alternatives forcreating and distributing diagnostic heartbeat packets in accordancewith an illustrative embodiment;

FIG. 9 depicts a block diagram of a registration process fordistributing diagnostic information and member state information in adomain in accordance with an illustrative embodiment;

FIG. 10 depicts a block diagram of an improved messaging infrastructurefor reliable peer-to-peer communication in accordance with anillustrative embodiment;

FIG. 11 depicts a block diagram of another improved messaginginfrastructure for reliable peer-to-peer communication in accordancewith an illustrative embodiment;

FIG. 12 depicts a block diagram of an improved client application inaccordance with an illustrative embodiment;

FIG. 13 depicts a block diagram of an improved client application inaccordance with an illustrative embodiment;

FIG. 14 depicts a block diagram of an improved distributed applicationinstance in accordance with an illustrative embodiment;

FIG. 15 depicts a block diagram of an improved distributed applicationinstance in accordance with an illustrative embodiment;

FIG. 16 depicts a block diagram of an improved administrationapplication for administrating distributed applications in accordancewith an illustrative embodiment;

FIG. 17 depicts a block diagram of an improved administrationapplication for administrating distributed applications in accordancewith an illustrative embodiment;

FIG. 18 depicts a flowchart of an example process of specifying adiagnostic heartbeat packet in accordance with an illustrativeembodiment;

FIG. 19A depicts a flowchart of an example process of throttlingdiagnostic heartbeating in accordance with an illustrative embodiment;

FIG. 19B depicts a flowchart of another example process of throttlingdiagnostic heartbeating in accordance with an illustrative embodiment;

FIG. 20 depicts a flowchart of an example process of detecting a softnetwork error condition in accordance with an illustrative embodiment;

FIG. 21 depicts a flowchart of an example process of historicallytracking soft network error conditions in a distributed domain inaccordance with an illustrative embodiment;

FIG. 22 depicts a flowchart of an example process of registration orsubscription in accordance with an illustrative embodiment;

FIG. 23 depicts a flowchart of an example process of soft network errorcondition aware data routing in accordance with an illustrativeembodiment;

FIG. 24 depicts a flowchart of an example process of circumventing asoft network error condition in accordance with an illustrativeembodiment;

FIG. 25 depicts a flowchart of another example process of circumventinga soft network error condition in accordance with an illustrativeembodiment;

FIG. 26 depicts a flowchart of another example process of mitigating theeffects of a soft network error condition in accordance with anillustrative embodiment; and

FIG. 27 depicts a flowchart of another example process of detecting asoft network error condition and mitigating the error's effects inaccordance with an illustrative embodiment.

DETAILED DESCRIPTION

Many distributed applications include a proprietary built-in reliablecommunication layer, which provides reliable peer-to-peer communicationservices to the distributed instances of the application. Otherdistributed applications use reliable peer-to-peer communicationservices provided by standalone peer-to-peer communication systems viaan application programming interface (API). Examples of the latter areReliable Scalable Clustering Technology (RSCT) in conjunction withCluster Aware AIX operating system (CAA) by IBM Corporation; ORACLEdatabase's Coherence by ORACLE Corporation; JGroups, which is anopen-source product; and WINDOWS operating system Clustering byMICROSOFT Corporation (each manufacturer may have one or more trademarksand other rights in the United States and other countries in theproduct-names and marks associated with their respective products).

In presently available cloud computing environments, implementations ofdistributed databases abound. Generally, distributed databases in cloudcomputing environments require a core set of above described functionsof a peer-to-peer communication system. Some such distributed databaseshave a proprietary built-in reliable communication layer whereas othersdepend on services of a standalone peer-to-peer communication system.

In this disclosure, the proprietary built-in reliable communicationlayer and the standalone peer-to-peer communication system arecollectively referred to as “messaging infrastructure.” The messaginginfrastructure of an embodiment provides the reliable peer-to-peercommunication services to the client applications and distributedapplications that communicate with the messaging infrastructure. Anembodiment described with respect to a messaging infrastructure can bepracticed to improve a proprietary built-in reliable communication layeror a standalone peer-to-peer communication system in the mannerdescribed, or a combination thereof.

Within the scope of this disclosure, members of a domain may be aheterogeneous collection of physical or virtual machines of differenthardware types, architectures, or running different operating systems.For example, a domain according to an embodiment can include onepersonal computer using the LINUX® operating system, a tablet computerbased on the ANDROID™ operating system, and a gaming console operatingusing a version of the WINDOWS® operating system. LINUX is a registeredtrademark of Linus Torvalds in the United States, other countries, orboth. ANDROID is a trademark of GOOGLE Inc. in the United States, othercountries, or both. WINDOWS is a trademark of MICROSOFT Corporation inthe United States, other countries, or both.

Each node in a given domain may communicate with another node in thedomain using one or more network adapters (adapters). Generally,different nodes, or applications executing on the different nodes, cancommunicate with each other using other mechanisms, such as sharedmemory or data storage area. In describing an embodiment using anadapter, the embodiment is not limited to only the network adapter meansof data communications. The embodiments contemplate applicability of thedisclosed concepts to such other means of communication between nodesand applications in a distributed data processing environment. Theembodiments are described using adapters only as examples for theclarity of the description and not as a limitation on the embodiments.

A reliable peer-to-peer communication system, such as the messaginginfrastructure of an embodiment, maintains membership state information(state information). State information is information about the state ofthe nodes and network adapters in a given domain. Generally, the stateinformation provides an indication of whether a node, a particularadapter, or a communication link between adapters in different nodes isalive and useable.

The embodiments recognize that the state information may be used inother ways in an implementation of reliable communication services. Forexample, in a standalone peer-to-peer communication system, the stateinformation can be shared with the distributed applications, clientapplications, or both to improve their respective performances. Clientsoften need to be informed about the state of domain members, such as thenodes, and in particular about the connectivity to those members via oneor more adapters, so that the clients can perform with a desired levelof reliability.

Presently, the state of the members is obtained by sending keep-alivedata packets, also known as heartbeats, between adapters of the variousnodes. Various algorithms are used for identifying adapterneighborhoods, that is, an identification of adapter(s) to which aparticular adapter sends heartbeats, and adapter(s) from which theparticular adapter listens for heartbeats. The neighborhoodidentification process results in a messaging topology. For eachadapter, a messaging topology entails an assignment of one or moreadapters to which to send heartbeats and another assignment of one ormore adapters from which to listen for heartbeats.

Such assignments can be fixed, random, static when defined, ordynamically changeable based on the changes in the domain. As anexample, in some implementations of the Gossip protocol, which is amembership protocol with total ordering properties, heartbeat packets,or messages, are sent to a randomly selected set of members.Implementations of AIX operating system's CAA, JGroups, and ORACLEdatabase's Coherence use the Gossip protocol for heartbeat messaging todetermine the state information.

Functionally, a reliable peer-to-peer communication system includes twocomponents—one that implements membership and another that implementsreliable communication services as described above. The membershipcomponent provides state information in the form of an intra-domainrouting table that is dynamically updated to represent networkconnectivity as detected by the heartbeating. This routing table is usedby the reliable peer-to-peer communication system to route data trafficin the distributed domain. In some implementations, client data trafficcan double as a rudimentary heartbeat, which can be utilized for similarpurposes by the reliable peer-to-peer communication functionality.

The embodiments recognize that the state information maintained in apresently available peer-to-peer communication system is deficient inseveral respects. Consequently, presently maintained state informationfails to identify and address certain types of problems in thedistributed data communication.

For example, the embodiments recognize that for performance reasons, thepresently used heartbeat implementation of a membership component sendsheartbeats of a pre-determined packet size, which is relatively smallcompared to the packets carrying the data payload of the distributedapplications. Furthermore, the embodiments recognize that the heartbeatpackets use a fixed pre-determined protocol type. While the smallheartbeat packets of a fixed protocol type are sufficient to establishif two adapters are communicating with each other and that the basicswitch settings are correct, the ability to receive heartbeats of smallsize or a specific protocol type is not sufficient as a reliabilitycriterion for a fully functional network connection. The embodimentsrecognize that the messaging infrastructure, and applications using themessaging infrastructure, typically generate network traffic of a variedpattern, packets of different sizes, and use several protocol types,reliable communication of which cannot be ensured by the presently usedheartbeat packets.

The embodiments further recognize that many types of errors in networkhardware or configuration are not detected by the presently usedheartbeating with small fixed packet size. The embodiments recognizethat such undetected errors impair the functionality of the messaginginfrastructure, applications dependent thereon, or both.

For example, under certain circumstances, transmission of a smallheartbeat packet may succeed where the transmission of larger packetsmay fail. In such circumstances, a frequently observed failure symptomis that the packets of smaller than a threshold size are processedthrough the data communication links, but packets of larger than thethreshold size are not.

The embodiments recognize many reasons for such an error condition thatresults in the failure of large packet transmissions. For example, adefective or misconfigured port on a network switch in a link may causethe failure. As another example, mismatched impedance values of cableterminators may cause signal reflection. An effect of signal reflectionis that packets of shorter than a threshold size pass through the linkbut the transmission of larger packets fails. For example, pulsereflection can have the effect that Cyclic Redundancy Check (CRC) errorsare observed for larger than the threshold size of packets.

As another example, a mismatch in the maximum packet size configurationof the endpoints of a link, such as an adapter or a port on a switch,can also cause failures in transmitting packets of larger than athreshold size while allowing smaller packets to be successfullytransmitted. Incompatible port settings at connection endpoints can havesimilar results. For example, if one adapter is configured for fullduplex communication and the other adapter in the link is not, thelikelihood that the transmission of packets above a certain size mayfail increases.

The embodiments recognize another type of error condition that escapesdetection with the presently used heartbeat packets is that packetscontaining certain bit patterns may fail transmission whereas otherpackets that do not include those bit patterns may succeed. Signaldegradation on network cables, static or noise in the link, radiointerference in the wireless links, frequency roll-off from a cable ofwrong type or a cable defect may also cause certain bit patterns to notbe transmitted correctly, causing a transmission failure for the packetsthat contain those bit patterns.

As an example, cable defects or the use of a cable type that is notaccording to the specification for a given type of data communicationlink may cause frequency roll-off in Ethernet cables. An effect offrequency roll-off is that packets with certain bit patterns will not betransmitted and that a high rate of CRC errors will be observed.

The embodiments recognize that mechanical damage to the cables,electro-magnetic frequency (EMF) interference from other sources,temperature, and many other similar factors can introduce these andother types of errors. Such other errors similarly escape detection bythe presently used heartbeating technique.

As another example of errors that escape detection, remedy, orworkaround due to the presently used heartbeating, the embodimentsrecognize that using the presently available heartbeating, packets ofcertain types may be transmitted successfully while packets of othertypes may not. For example, the presently used heartbeating technique isinsufficient to detect such errors when caused by switches or firewallsthat are configured to only handle packets of a certain type. Forexample, presently, AIX CAA will not detect a remote adapter to be aliveif processing of multicast packets is disabled on a switch in the link.Failure to process certain packet types, as in this example, can havedire results. For example, multiple occurrences of such failures cancause cluster partition. A failure affecting a single adapter may renderreliable peer-to-peer communication services non-functional.

The embodiments recognize errors in device drivers as another example oferror conditions not detected, remedied, or circumvented by thepresently used heartbeating. Errors in device drivers can cause failurein large data size user datagram protocol (UDP) packet processing, suchas causing a failure to reassemble data packets or causing processoroverload.

Error conditions such as those described above as examples are calledsoft network errors, or soft network failures. Generally, within thescope of this disclosure, a soft network error is a network errorcondition that adversely affects the transmission of packets havingcertain properties in a data communication network. Many other variantsof soft network errors will be apparent from this disclosure to those ofordinary skill in the art and the same are contemplated within the scopeof the illustrative embodiments. Soft network errors go undetected underthe presently used heartbeating schemes, yet have a pervasive effect onthe functionality of the reliable peer-to-peer communication system andapplications that depend thereon. Soft network errors are expensive anddifficult to debug, and require specialized expertise for identificationand isolation.

For example, the diagnosis of soft network errors presently requiresknowledge of the internals of the reliable peer-to-peer communicationsystem, and of the distributed applications relying thereon, to localizethe cause of failure to the networking layer. Subsequently, hardwarediagnostics and traces have to be collected to identify the hardwarecomponent that caused the error. Debugging requires coordination ofseveral groups that manage various components, such as applications,operating system, storage area networks (SAN) and networking. Detecting,remedying, and circumventing soft network errors are therefore presentlytasks that require a variety of skills along with significant loss ofsystem availability.

In distributed systems that employ certain clustering middleware, somecommon symptoms of soft network errors are “hangs” in the Group Serviceslayer. In the presence of such a hang, client applications such as thecluster manager and the logical volume manager are renderednon-functional. In the presence of a hang of processing in GroupServices, the cluster manager hangs and the logical volume managerforces volume groups off-line if no response is received within aspecified time-out period.

The illustrative embodiments used to describe the invention generallyaddress and solve the above-described problems and other problemsrelated to soft network errors in reliable peer-to-peer communicationsin distributed data processing systems. The illustrative embodimentsprovide a method, system, and computer program product for improving adistributed application using diagnostic heartbeating.

Generally, an embodiment of the invention provides an improved method ofheartbeating across a peer-to-peer data communication system. Anembodiment describes an improved heartbeat packet configuration todetect soft network errors. An improved heartbeat packet, called adiagnostic heartbeat packet, includes features that enable detection,remedying, and circumventing a variety of soft network errors.

Basic heartbeats are heartbeat packets configured to detect a state of anode—whether the node is alive/responsive—with provisions to preventerroneous declaration of a node as down/non-responsive. A diagnosticheartbeat packet can be used for obtaining qualitative link informationfor consumption by higher layers, reliable messaging, or clients, toensure correct functionality beyond the basic alive/dead status of anode.

Typically, a basic heartbeat packet is configured with attribute valuesfor which the likelihood of success of transmission is the largest in agiven data processing environment. For this reason, a basic heartbeatpacket has a small packet size relative to the data packets in the datatraffic of the data processing environment.

The electrical errors resulting in soft network errors, as describedearlier, are more likely to affect transmission of packets larger than acertain size. Consider an example to illustrate the undesirable effectof using only diagnostic heartbeats—if a node does not receive anyheartbeats from any adapter of a given remote node, the node may declarethe remote node as non-responsive. Consequently, clients of themessaging layer might initiate takeover of resources. For example, adatabase previously executing on the remote node may be brought onlineat a different resource.

Reliable information about the alive/dead status of a node is importantbecause, for example, if the remote node is still alive but a link tothe remote node is unreliable, bringing the database online at anothernode can lead to data corruption. Such undesirable effects of softnetwork errors, such as the database partition in the above example, canbe prevented by sending basic heartbeats that are most likely to succeedin a data processing environment. Therefore, an embodiment sends basicheartbeats intermixed with diagnostic heartbeats for reliabilityreasons, such as to get the basic information about whether a remotenode is alive, in a reliable manner.

Furthermore, various embodiments describe improvements to messaginginfrastructure that utilize the diagnostic capabilities afforded by theuse of diagnostic heartbeat packets (diagnostic heartbeating). Variousembodiments further describe modifications to distributed applicationinstances to improve the reliability of their data communications in thedistributed data processing environment.

Some embodiments describe improvements to client applications that canimprove the reliability, performance, or both, of the distributedapplications' functionality. Some other embodiments describemodifications to the existing data processing system components, such asmodifications to a TCP/IP stack in the kernel space of a data processingsystem, to enable diagnostic heartbeating.

Some embodiments describe a method of detecting a soft network errorusing the diagnostic heartbeats. Some other embodiments describe amethod of remedying a soft network error, circumventing a soft networkerror, or a combination thereof.

The illustrative embodiments are described with respect to certain dataand data structures only as examples. Such descriptions are not intendedto be limiting on the invention. For example, an illustrative embodimentdescribed with respect to a particular data structure of a diagnosticheartbeat can be implemented with additional or different attributes,data payload, and other components within the scope of the illustrativeembodiments. As another example, an illustrative embodiment describedwith respect to a state information record in the form of a table can beimplemented using another suitable form of storing the state informationin a messaging infrastructure component according to an embodiment.

Furthermore, the illustrative embodiments may be implemented withrespect to any type of data, data source, or access to a data sourceover a data network. Any type of data application or storage device mayprovide the data, such as data for an application data packet orhistorical state information data, to an embodiment of the invention,either locally at a data processing system or over a data network,within the scope of the invention.

The illustrative embodiments are further described with respect tocertain applications only as examples. Such descriptions are notintended to be limiting on the invention. An embodiment of the inventionmay be implemented with respect to any type of application, such as, forexample, applications that are served, the instances of any type ofserver application, a platform application, a stand-alone application,an administration application, or a combination thereof.

An application, including an application implementing all or part of anembodiment, may further include data objects, code objects, encapsulatedinstructions, application fragments, services, and other types ofresources available in a data processing environment. For example, aJAVA® programming language object, an ENTERPRISE JAVABEAN (EJB) object,a servlet, or an applet may be manifestations of an application withrespect to which the invention may be implemented. (JAVA and allJAVA-based trademarks and logos are trademarks or registered trademarksof ORACLE Corporation and/or its affiliates).

An illustrative embodiment may be implemented in hardware, software, ora combination thereof. An illustrative embodiment may further beimplemented with respect to any type of data storage resource, such as aphysical or virtual data storage device, that may be available in agiven data processing system configuration.

The examples in this disclosure are used only for the clarity of thedescription and are not limiting on the illustrative embodiments.Additional data, operations, actions, tasks, activities, andmanipulations will be conceivable from this disclosure and the same arecontemplated within the scope of the illustrative embodiments.

The illustrative embodiments are described using specific code, designs,architectures, layouts, schematics, and tools only as examples and arenot limiting on the illustrative embodiments. Furthermore, theillustrative embodiments are described in some instances usingparticular software, tools, and data processing environments only as anexample for the clarity of the description. The illustrative embodimentsmay be used in conjunction with other comparable or similarly purposedstructures, systems, applications, or architectures.

Any advantages listed herein are only examples and are not intended tobe limiting on the illustrative embodiments. Additional or differentadvantages may be realized by specific illustrative embodiments.Furthermore, a particular illustrative embodiment may have some, all, ornone of the advantages listed above.

With reference to the figures and in particular with reference to FIGS.1 and 2, these figures are example diagrams of data processingenvironments in which illustrative embodiments may be implemented. FIGS.1 and 2 are only examples and are not intended to assert or imply anylimitation with regard to the environments in which differentembodiments may be implemented. A particular implementation may makemany modifications to the depicted environments based on the followingdescription.

FIG. 1 depicts a pictorial representation of a network of dataprocessing systems in which illustrative embodiments may be implemented.Data processing environment 100 is a network of computers in which theillustrative embodiments may be implemented. Data processing environment100 includes network 102. Network 102 is the medium used to providecommunications links between various devices and computers connectedtogether within data processing environment 100. Network 102 may includeconnections, such as wire, wireless communication links, or fiber opticcables. Server 104 and server 106 couple to network 102 along withstorage unit 108. Software applications may execute on any computer indata processing environment 100.

In addition, clients 110, 112, and 114 couple to network 102. A dataprocessing system, such as server 104 or 106, or client 110, 112, or 114may contain data and may have software applications or software toolsexecuting thereon.

As an example, server 104 includes distributed application instance 105that utilizes reliable peer-to-peer communication services frommessaging infrastructure 107. Similarly, server 106 includes distributedapplication instance 109 that utilizes reliable peer-to-peercommunication services from messaging infrastructure 111. Clientapplication 113, which may be a client of distributed applicationinstance 109, user of messaging infrastructure 111's services, or both,may also execute on server 106. Similarly, client 114 includes clientapplication 115, which may be a client of distributed applicationinstance 109, user of messaging infrastructure 111's services, or both.Administration application 103 may be an administration application foradministrating distributed application instances 105 and 109.Application 103 is usable with an embodiment as described herein.

In one embodiment, client application 113 connects with messaginginfrastructure 111 via inter-process communication, such as pipes,shared memory, semaphores, or sockets. In another embodiment, client 115connects with messaging infrastructure 107 via network sockets ormessage passing infrastructures such as JAVA programming language's RMIor CORBA. Generally, a distributed application instance and adistributed messaging infrastructure need not necessarily execute on thesame server. For example, distributed application instance 105 andmessaging infrastructure 107 may not both execute on server 106, but ondifferent data processing systems. For example, in a virtualized dataprocessing environment, distributed application instance 105 andmessaging infrastructure 107 may be on the same frame but in differentlogical partitions (LPARs) and the communication between distributedapplication instance 105 and messaging infrastructure 107 occurs via thehypervisor within the scope of the illustrative embodiments. Distributedapplication instance 105, messaging infrastructure 107, distributedapplication instance 109, messaging infrastructure 111, clientapplication 115, and client application 113 may implement all or part ofan embodiment.

As an example, components of distributed application instance 105,messaging infrastructure 107, distributed application instance 109,messaging infrastructure 111, client application 113, and clientapplication 115 according to an embodiment may each be implemented asprogram instructions that can be stored on at least one of one or moredata storage devices and executed by at least one of one or moreprocessors via at least one of one or more memories.

Servers 104 and 106, storage unit 108, and clients 110, 112, and 114 maycouple to network 102 using wired connections, wireless communicationprotocols, or other suitable data connectivity. For example, a clustertypically has multiple network types, such as IP networks, directconnections of machines via packets exchange implemented by storageprotocols (Fibre Channel, SCSI), serial links, and message exchange viawriting and reading packets to shared storage such as a hard disk drive.For performance reasons, in sending client traffic, an IP network isgiven precedence. Furthermore, a given network type may not connect toall nodes in a cluster. For instance, a cluster may span machineslocated at two geographically distant sites. For the long distanceconnection, Ethernet may be the preferred connection, and within ageographical location, a direct connection may be preferable.Additionally, within a geographical location, additional non-IPnetworks, such as Fibre channel or serial connections may be used withinthe scope of the illustrative embodiments.

Clients 110, 112, and 114 may be, for example, personal computers,network computers, thin clients, or industrial control systems. In thedepicted example, server 104 may provide data, such as boot files,operating system images, and applications to clients 110, 112, and 114.Clients 110, 112, and 114 may be clients to server 106 in this example.Clients 110, 112, 114, or some combination thereof, may include theirown data, boot files, operating system images, and applications. Dataprocessing environment 100 may include additional servers, clients, andother devices that are not shown.

In the depicted example, data processing environment 100 may be theInternet. Network 102 may represent a collection of networks andgateways that use the Transmission Control Protocol/Internet Protocol(TCP/IP) and other protocols to communicate with one another, andencompasses components including but not limited to IP and SANcomponents. At the heart of the Internet is a backbone of datacommunication links between major nodes or host computers, includingthousands of commercial, governmental, educational, and other computersystems that route data and messages. Of course, data processingenvironment 100 also may be implemented as a number of different typesof networks, such as for example, an intranet, a local area network(LAN), or a wide area network (WAN). FIG. 1 is intended as an example,and not as an architectural limitation for the different illustrativeembodiments.

Among other uses, data processing environment 100 may be used forimplementing a client-server environment in which the illustrativeembodiments may be implemented. A client-server environment enablessoftware applications and data to be distributed across a network suchthat an application functions by using the interactivity between aclient data processing system and a server data processing system. Dataprocessing environment 100 may also employ a service orientedarchitecture where interoperable software components distributed acrossa network may be packaged together as coherent business applications.

With reference to FIG. 2, this figure depicts a block diagram of a dataprocessing system in which illustrative embodiments may be implemented.Data processing system 200 is an example of a computer, such as server104, server 106, or client 110 in FIG. 1, in which computer usableprogram code or instructions implementing the processes of theillustrative embodiments may be located for the illustrativeembodiments.

In the depicted example, data processing system 200 employs a hubarchitecture including North Bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 arecoupled to north bridge and memory controller hub (NB/MCH) 202.Processing unit 206 may include one or more processors and may beimplemented using one or more heterogeneous processor systems. Graphicsprocessor 210 may be coupled to NB/MCH 202 through an acceleratedgraphics port (AGP) in certain implementations.

In the depicted example, local area network (LAN) adapter 212 is coupledto south bridge and I/O controller hub (SB/ICH) 204. Audio adapter 216,keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224,universal serial bus (USB) and other ports 232, and PCI/PCIe devices 234are coupled to south bridge and I/O controller hub 204 through bus 238.Hard disk drive (HDD) 226 and CD-ROM 230 are coupled to south bridge andI/O controller hub 204 through bus 240. PCI/PCIe devices 234 mayinclude, for example, Ethernet adapters, add-in cards, and PC cards fornotebook computers. PCI uses a card bus controller, while PCIe does not.ROM 224 may be, for example, a flash binary input/output system (BIOS).Hard disk drive 226 and CD-ROM 230 may use, for example, an integrateddrive electronics (IDE) or serial advanced technology attachment (SATA)interface. A super I/O (SIO) device 236 may be coupled to south bridgeand I/O controller hub (SB/ICH) 204 through bus 238.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within dataprocessing system 200 in FIG. 2. The operating system may be acommercially available operating system such as MICROSOFT® WINDOWS®operating system (MICROSOFT and WINDOWS are trademarks of MICROSOFTCorporation in the United States, other countries, or both), or LINUX®operating system (LINUX is a trademark of Linus Torvalds in the UnitedStates, other countries, or both). An object oriented programmingsystem, such as the JAVA programming system, may run in conjunction withthe operating system and provide calls to the operating system from JAVAprograms or applications executing on data processing system 200 (JAVAand all JAVA-based trademarks and logos are trademarks or registeredtrademarks of ORACLE Corporation and/or its affiliates).

Program instructions for the operating system, the object-orientedprogramming system, the processes of the illustrative embodiments, andapplications or programs, including messaging infrastructures 107 and111, distributed application instances 105 and 109, and clientapplications 113 and 115, are located on one or more storage devices,such as hard disk drive 226, and may be loaded into a memory, such as,for example, main memory 208, read only memory 224, or one or moreperipheral devices, for execution by processing unit 206. Programinstructions may also be stored permanently in non-volatile memory andeither loaded from there or executed in place. For example, thesynthesized program according to an embodiment can be stored innon-volatile memory and loaded from there into DRAM.

The hardware in FIGS. 1-2 may vary depending on the implementation.Other internal hardware or peripheral devices, such as flash memory,equivalent non-volatile memory, or optical disk drives and the like, maybe used in addition to or in place of the hardware depicted in FIGS.1-2. In addition, the processes of the illustrative embodiments may beapplied to a multiprocessor data processing system.

In some illustrative examples, data processing system 200 may be apersonal digital assistant (PDA), which is generally configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data. A bus system may comprise one or morebuses, such as a system bus, an I/O bus, and a PCI bus. Of course, thebus system may be implemented using any type of communications fabric orarchitecture that provides for a transfer of data between differentcomponents or devices attached to the fabric or architecture.

A communications unit may include one or more devices used to transmitand receive data, such as a modem or a network adapter. A memory may be,for example, main memory 208 or a cache, such as the cache found innorth bridge and memory controller hub 202. A processing unit mayinclude one or more processors or CPUs.

The depicted examples in FIGS. 1-2 and above-described examples are notmeant to imply architectural limitations. For example, data processingsystem 200 also may be a tablet computer, laptop computer, or telephonedevice in addition to taking the form of a PDA.

With reference to FIG. 3, this figure depicts a block diagram of ageneralized reliable peer-to-peer communication configuration in adistributed data processing system with respect to which an illustrativeembodiment may be implemented. Data processing system (node) 302 may bea node data processing system, such as server 106 in FIG. 1, in a givendistributed data processing environment.

Distributed application instance 304 may be executing in data processingsystem 302 and using messaging infrastructure 306 for reliablepeer-to-peer communication services. As described earlier, messaginginfrastructure 306 may be a standalone peer-to-peer communication systemin data processing system 302 or a built-in peer-to-peer communicationcomponent of distributed application instance 304.

Client application 308 may be an example client application that mayutilize the peer-to-peer communication services of messaginginfrastructure 306. As an example, client application 308 may be anadministration application, such as administration application 103 inFIG. 1, for the various instances of a distributed application of whichdistributed application instance 304 may be one instance. Clientapplication 310 may be another example client application that may be aclient of distributed application instance 304. For example, ifdistributed application instance 304 were an instance of a distributeddatabase, client application 310 could be a database client application,such as a transactional application that uses distributed applicationinstance 304 for storing transaction data.

Messaging infrastructure 306 maintains state information 312 (membershipinformation, membership state information). State information accordingto presently used peer-to-peer communication systems may includeinformation indicating whether an adapter, a node, or a link isoperational (alive). For example, adapters 314, 316, and 318 may bethree network adapters in node 302. Adapters 314, 316, and 318 may bemembers of the domain whose state or status is stored in stateinformation 312. The depicted configuration is only for the clarity ofthe description and not a limitation on the embodiments. An embodimentcan be implemented in a cluster configuration that includes variouscombinations of network types. Furthermore, a particular network may notconnect all nodes in the cluster. For example, nodes A and B in thecluster might be connected by shared storage or a SAN, and nodes C and Dby a different SAN. All four nodes may be interconnected using one ormore Internet Protocol (IP) networks, or at least a pair of nodes—onefrom each pair, such as nodes A and C—connected by a SAN.

Furthermore, an embodiment may be implemented using virtualized dataprocessing systems. For example, all or some nodes belonging to thedomain might be logical partitions (e.g., LPARs, SOLARIS operatingsystem's LDom, or a SUN platform's Dynamic System Domain (DSD)). In oneembodiment, the virtual nodes of the domain are distributed acrossmultiple frames. In another embodiment the virtual nodes may all resideon the same frame.

Additionally, the I/O devices of LPARs may or may not be virtual. A nodebelonging to the domain may include some function as Virtual I/O Server(VIOS). Communication between nodes on different frames may be acrossdifferent types of networking media, such as Ethernet or shared storage.Communication between nodes that reside on the same frame can bevirtualized such that the communication path includes Ethernet networkand storage devices, but data exchange for such devices in the sameframe is implemented using the hypervisor.

Continuing with the depicted example, network 320 may include any numberor type of data communication methods, means, and protocols. Forexample, adapter 314 may be an Ethernet adapter with one IP address toconnect to network 320 and adapter 316 may be another Ethernet adapterwith a different IP address to connect to network 320. Adapter 318 maybe an Internet Small Computer Cystem Interface (iSCSI) adapter usablefor connecting to network 320. Alternatively, adapter 318 may be aUniversal Serial Bus (USB) adapter connecting the network. Fibre Channelnetworks based on optical fibre or copper hardware, various serialarchitectures, for instance Serially Attached SCSI (SAS), SeriallyAdvanced Technology Attachment (SATA), or INFINIBAND architecture areother network architectures and hardware which network 320 may include.

For example, state information 312 may include an indicationcorresponding to each of the three example adapters 314, 316, and 318for node 302 to indicate whether that particular adapter is operational(alive) at a given time. State information 312 may also include anindication of whether node 302 as a whole is available at a given time.For example, node 302 may be deemed available if at least one ofadapters 314, 316, or 318 is indicated as alive in state information312.

In the presently used heartbeating technology, availability informationof the members is available but qualitative information of thatavailability is not available. For example, an adapter may be available,but only packets of a size below a threshold size may be sent orreceived using that available adapter, a connection there to, a cableconnected there to, a switch port in communication therewith, or acombination of other components. Presently, the state information aboutthe members of a domain is not parameterized to reflect conditions thatmay contribute to soft network errors.

With reference to FIG. 4, this figure depicts a block diagram of thevarious messaging that depends on the membership state information in areliable peer-to-peer communication system, which can be improved usingan illustrative embodiment. Node 402 may be a node configured in amanner similar to node 302 in FIG. 3.

Node 402 communicates with node 404 using network 406 to form a domain.Node 404 may also be a node configured in a manner similar to node 302in FIG. 3, but not necessarily identically as node 402. Node 402 hostsdistributed application instance 408 and node 404 hosts distributedapplication instance 412. Distributed application instances 408 and 412are analogous to distributed application instance 304 in FIG. 3.

Messaging infrastructure 410 in node 402 is analogous to messaginginfrastructure 306 in FIG. 3. Messaging infrastructure 414 in node 404is also analogous to messaging infrastructure 306 in FIG. 3. Clientapplications 416 and 418 use peer-to-peer communication services ofmessaging infrastructure 410 as described with respect to clientapplications 308 and 310 in FIG. 3. Client applications 420 and 422 usepeer-to-peer communication services of messaging infrastructure 414 in asimilar manner. Any combination of client application instances maycomprise a distributed domain, the distributed domain including thosenodes, whether physical or virtual, and the adapters therein, on whichparticipating messaging infrastructures 410 and 414 provide theirservices. For example, in one embodiment, a domain may include clientapplications 416 and 420. In another embodiment, a domain may includeclient applications 416, 420, and 422. In another embodiment, the domainmay include client applications 416, 418, 420, and 422.

Adapters 424, 426, and 428 may be adapters in node 402 whose stateinformation is maintained in a messaging infrastructure instance, asdescribed with respect to adapters 314, 316, and 318 in FIG. 3. Adapters430, 432, and 434 may be adapters in node 404 whose state information issimilarly maintained in a messaging infrastructure instance. Eachinstance of messaging infrastructures 410 and 414 maintain stateinformation for all adapters of the domain. For example, messaginginfrastructures 410 and 414 each include state information of adapters424, 426, 428, 430, 432, and 434.

Messages 442, 444, 446, and 448, all labeled “H”, are example heartbeatmessages (heartbeat packets, or heartbeats) being transmitted betweenadapters. For example, adapter 432 sends and adapter 424 receivesheartbeat 442. Similarly, adapter 430 sends and adapter 426 receivesheartbeat 444; adapter 428 sends and adapter 432 receives heartbeat 446;and adapter 428 sends and adapter 434 receives heartbeat 448. Many otheradapter pairs or neighborhoods may similarly be configured forexchanging heartbeats, but are not depicted in this figure for theclarity of the illustration. Heartbeats may also be multicast. Forexample, adapter 432 may send a heartbeat that is received by adapters424 and 426 (not shown).

Message 450 labeled “S” is an example synchronization message. Asdescribed previously, messaging infrastructure 410 and messaginginfrastructure 414 exchange message 450 to manage synchronizationbarriers. Additional synchronization messages may be transmitted in thedepicted domain but are not shown in the figure for the clarity of theillustration. In the depicted example, message 450 is communicated usingadapters 424 and 430, perhaps because the state information in messaginginfrastructures 410 and 414 indicates that adapters 424 and 430 areavailable for communication.

Message 452 labeled “A” is an example message or packet that carriesdata payload for distributed application instances 408 and 412. In thedepicted example, message 452 is communicated using adapters 428 and432, perhaps because the state information in messaging infrastructures410 and 414 indicates that adapters 428 and 432 are available forcommunication.

Message 452 may be of a size different from the size of any of heartbeatmessages 442, 444, 446, and 448. As an example, it is not uncommon forthe size of message 452 to exceed the size of message 442. Assume thatone or both of adapters 428 and 432 include a reason for a soft networkerror condition. As the embodiments recognize, the state informationpresently utilized for selecting a path for transmitting message 452will allow selecting the link established between adapters 428 and 432for transmitting message 452, and will not be able to avoid atransmission failure of message 452 under these circumstances. Anadapter is selected in the above example without implying a limitationon the illustrative embodiments. Any component of a network, such as acable, a connector, or a port, can similarly contribute a soft networkerror condition.

With reference to FIG. 5, this figure depicts a block diagram ofconceptual distinctions between a basic heartbeat and a diagnosticheartbeat in accordance with an illustrative embodiment. Basic heartbeatpacket 502 may be useable as message 442, 444, 446, or 448 in FIG. 4.

Basic heartbeat packet 502 includes header 504 and heartbeat parameters506. For example, header 504 may include a source IP address and port, adestination IP address and port, a timestamp by the sender, a checksum,and other commonly used basic heartbeat header information. Heartbeatparameters 506 may include for example, a heartbeat timeout period,packet size of basic heartbeat packet 502, and other commonly used basicheartbeat parameters. Some protocols, such as Ethernet and FibreChannel, include a footer segment (not shown) in packets such as basicheartbeat packets 502. A footer segment is not depicted in the variousheartbeat packets of FIG. 5 only for simplification of the depiction andnot as a limitation on the protocols to which an embodiment applies. Animplementation of an embodiment for a particular protocol can easilyinclude a footer segment within the scope of the illustrativeembodiments.

Diagnostic heartbeat packet 508 constructed according to an embodimentimproves basic heartbeat packet 502. In one embodiment, diagnosticheartbeat packet 508 may include all the information found in basicheartbeat 502 and additional information. For example, in such anembodiment, header 510 would be similar in structure to header 504 andheartbeat parameters 512 would be similar in structure to heartbeatparameters 506. However, header 510, heartbeat parameters 512, or both,may have different values from header 504, heartbeat parameters 506, orboth, to distinguish packet 508 as a diagnostic heartbeat packet asopposed to a basic heartbeat packet. In another embodiment, header 510,heartbeat parameters 512, or both, may also be structurally differentfrom header 504, heartbeat parameters 506, or both, respectively.

In either of the above embodiments of diagnostic heartbeat packet 508,diagnostic heartbeat packet 508 further includes diagnostic attributes514. In an embodiment, diagnostic heartbeat packet 508 further includesdata 516.

Diagnostic attributes 514 include attributes that can be populated withinformation usable for qualitative measurements, which can be added to amember's state information. For example, one diagnostic attribute 514may be used to specify a packet size that is different, perhaps larger,than the size of basic heartbeat packet 502.

In one embodiment, data 516 may be used to pad bits to diagnosticheartbeat packet 508 to make the size of diagnostic heartbeat packet 508correspond to the packet size attribute in diagnostic attributes 514. Inanother embodiment, an adapter that receives diagnostic heartbeat packet508 with a value stored in a packet size attribute in diagnosticattributes 514 may automatically inflate diagnostic heartbeat packet508's size to match that value, or regard diagnostic heartbeat packet508 as being of that specified packet size value. Using such examplediagnostic attribute 514, diagnostic heartbeat packet 508 is usable fortesting soft network errors that manifest themselves when the packetsize, such as the size of message 452 in FIG. 4, exceeds a particularthreshold size.

Another example diagnostic attribute 514 may be a protocol type beingused for transmitting diagnostic heartbeat packet 508. Using suchexample diagnostic attribute 514, diagnostic heartbeat packet 508 isusable for testing soft network errors that manifest themselves when aparticular protocol is used.

Another example diagnostic attribute 514 may be used to place a specificbit pattern in diagnostic heartbeat packet 508. Using such examplediagnostic attribute 514, diagnostic heartbeat packet 508 is usable fortesting soft network errors that manifest themselves when a particularbit pattern appears in the packet being transmitted. In one embodiment,the bit pattern itself may be placed in the data 516 portion ofdiagnostic heartbeat packet 508. A diagnostic attribute in diagnosticattributes 514 may indicate that diagnostic heartbeat packet 508contains a bit pattern in the payload, i.e., in the data 516 portion ofdiagnostic heartbeat packet 508.

These diagnostic attributes 514 and their manner of use are describedonly as examples for describing the operation of diagnostic heartbeatpacket 508 in an easy to understand manner. Generally, a diagnosticattribute be configured to represent Boolean values, a range ofalphanumeric values, or a data structure of other diagnostic attributes.Those of ordinary skill in the art will be able to conceive from thisdisclosure many other diagnostic attributes 514, contents of data 516,contents of header 510, contents of heartbeat parameters 512, or acombination thereof, to diagnose many other types of soft networkerrors. Such other conceptions are contemplated within the scope of theillustrative embodiments.

Using a combination of diagnostic attributes 514, data 516, header 510,and heartbeat parameters 512 in the described manner, diagnosticheartbeat packet 508 can be transmitted in a distributed domain todetect soft network errors, determine the conditions under which certainsoft network errors occur, and identify possible solutions to at leastsome of those soft network errors. For example, Ethernet frames areeither 1518 bytes (1500 payload bytes), or in the case of jumbo framestypically 9 KB (not standardized). A failure to transmit a packetsmaller than 1518 bytes indicates a hardware error, a failure totransmit a packet larger than 1518 bytes is likely a soft network errorin fragment handling for normal size frames or a hardware error forjumbo frames. The condition that causes such an example soft networkerror may be detected as a configuration of a receiving adapter. Apossible solution that may be identified through this exercise may be toreconfigure the receiving adapter or cause the sending adapter tore-packetize data into smaller packets if transmitting on the link withthat receiving adapter.

As another example, Fibre Channel Frames can carry up to 2112 bytes ofpayload, and an Infiniband frame up to 4 KB. A failure to transmit alarge frame might indicate mechanical damage to cables, signaldegradation due to temperature, cable length or imperfect connectors ifoptical fibre is the transport medium. A failure to transmit a largeframe might be an effect of signal degradation or frequency roll-off ifthe transport medium is copper.

Diagnostic heartbeat packet 508 is described in a simplified manner toillustrate how a given heartbeat packet's structure can be modified toform diagnostic heartbeat packet 508. Neither basic heartbeat packet502, nor diagnostic heartbeat packet 508 is limited to exactly thedepiction in FIG. 5. Those of ordinary skill in the art will be able toidentify many other possible structures of a basic heartbeat packet thatis usable as basic heartbeat 502 within the scope of the illustrativeembodiments. Those of ordinary skill in the art will be able to furtherrecognize from this disclosure the various structures possible fordiagnostic heartbeat packet 508 for such variations of basic heartbeatpacket 502, and such structures of diagnostic heartbeat packet 508 arecontemplated within the scope of the illustrative embodiments.

With reference to FIG. 6, this figure depicts a block diagram of animproved messaging infrastructure for reliable peer-to-peercommunication services in accordance with an illustrative embodiment.Messaging infrastructure 602 may be messaging infrastructure 410 in FIG.4 as improved by an embodiment described herein.

Messaging infrastructure 602 includes state information 604. Stateinformation 604 may include membership state information as available inpresently used messaging infrastructures, such as adapter state (e.g.,available or unavailable), node status (e.g., active or inactive), andintra-domain routing information (e.g., available routing paths from oneadapter in one node to another adapter in another node).

Further, in accordance with an illustrative embodiment, stateinformation 604 includes diagnostic information 606, such as linkperformance information and information about known issues relatedthereto (e.g., soft network errors). Diagnostic attributes 608 may bevalues of diagnostic attributes derived from diagnostic heartbeatpackets received at an adapter, whose state the messaging infrastructure602 tracks.

In one embodiment, information 606 includes the values of diagnosticattributes 608 or transformations thereof. For example, a diagnosticheartbeat packet may include an adapter identifier, such as a machineaddress, that is associated with a soft network error. The machineaddress may be converted or transformed to a corresponding IP addressand a port and stored in information 606.

In another embodiment, information 606 may be derivative informationderived from diagnostic attributes 608. For example, information 606 mayinclude a throughput performance metric of a link between two adapters(e.g., a value for throughput with regards to a given set ofattributes). The throughput metric of the link may be derived from apacket size limitation on that link that has to be used to work around alarge packet transmission error detected on that link by using thediagnostic heartbeat packets.

Historical state information 610 may be any repository or data storagesuitable for storing state information 604, including information 606and diagnostic attributes 608, collected through diagnostic heartbeatingin a given domain over a period of time. Historical information 610 isuseable for detecting a trend in the performance of various membercomponents, predicting certain soft network errors, isolating the causeof certain soft network errors, debugging soft network errors, improvingthe performance of peer-to-peer communication system, matching a qualityof service requirement from a distributed application instance or clientapplication to adapters and links, and many other such diagnostic andperformance purposes.

With reference to FIG. 7, this figure depicts a block diagram of animproved messaging infrastructure in accordance with an illustrativeembodiment. Messaging infrastructure 702 is usable as messaginginfrastructure 602 in FIG. 6, and includes the features of messaginginfrastructure 602 depicted in FIG. 6. For example, membershipinformation 704 of messaging infrastructure 702 may include stateinformation 604 of messaging infrastructure 602 in FIG. 6.

Heartbeating component 706 is a component of messaging infrastructure702 that, as one of the functions, determines the type of heartbeatpacket to send from a particular member adapter. As another function,heartbeating component 706 extracts the diagnostic information fromreceived diagnostic heartbeat packets to populate membership information704, e.g., to populate the state information in membership information704.

For determining a type of heartbeat packet to send from an adapter,heartbeating component 706 may use information stored in membershipinformation 704. For example, membership information 704 mayadditionally store data communication performance requirements ofdistributed application instances, client applications, or both. As anexample, a distributed application instance may specify in membershipinformation 704 that the distributed application instance uses a packetsize of 4 KB. As another example, a client application may specify thatUDP must be a supported protocol on a link used for the clientapplication's data communications.

Using these and other similarly purposed information from membershipinformation 704, heartbeating component 706 specifies the diagnosticattributes to use in a diagnostic heartbeat packet, the values of atleast some of those diagnostic attributes, a data size or pattern in thepayload of the diagnostic heartbeat packet, or a combination thereof.

Heartbeating component 706 communicates with another component forcreation of the heartbeat packets. Some embodiments of such othercomponent are described with respect to FIG. 8. Once a diagnosticheartbeat packet has been constructed to include the required diagnosticattributes and data, adapter 708 sends that diagnostic heartbeat packetto another adapter in adapter 708's heartbeat neighborhood topology.When adapter 708 receives a diagnostic heartbeat packet, adapter 708passes the diagnostic heartbeat packet or parts thereof to heartbeatingcomponent 706, which parses the diagnostic heartbeat packet or partsthereof for populating the member state information in membershipinformation 704.

With reference to FIG. 8, this figure depicts a block diagram depictingseveral alternatives for creating and distributing diagnostic heartbeatpackets in accordance with an illustrative embodiment. A diagnosticheartbeat packet constructed using one of these alternatives is usablefor sending to an adapter, such as from heartbeating component 706 toadapter 708 in FIG. 7.

Data processing system 802 may be a node in a distributed domain, suchas node 402 in FIG. 4 or a node (not shown) that includes messaginginfrastructure 702 in FIG. 7. Data processing system 802 includes userspace 804 that is used by applications executing on data processingsystem 802 for reading and writing their application data. Dataprocessing system 802 also includes kernel space 806. Kernel space 806is used by the operating system of data processing system 802 forrunning kernel processes, including TCP/IP stack 808. In one embodiment,diagnostic heartbeat generation and analysis component 810 may executein user space 804. For example, a daemon running in user space 804 tosupport reliable peer-to-peer communication services may be modified toinclude component 810. Alternatively, a new daemon can be added toprovide the functionality of component 810.

Component 810 receives the diagnostic attributes to be used in adiagnostic heartbeat packet. Component 810 may further receive desiredvalues of those diagnostic attributes. Component 810 may also receivedata, such as specific bit patterns or size of data to include in adiagnostic heartbeat packet. Component 810 may receive such informationfrom a heartbeating component of a messaging infrastructure, such asheartbeating component 706 in FIG. 7. Component 810 creates a diagnosticheartbeat packet based on the received information.

In another embodiment, diagnostic heartbeat generation and analysiscomponent 812 may execute in kernel space 806. For example, pseudodevice driver 814 (or other one or more device drivers) relative toTCP/IP or network device driver stack 808 may be modified to includecomponent 812. Alternatively, a new device driver can be added to kernelspace 806 to provide the functionality of component 812. Component 812operates in a manner similar to component 810, and receives and deliverssimilar information.

In one embodiment, the functionality of component 810 or 812 can bedistributed between user space 804 and kernel space 806. For example,component 812's diagnostic heartbeat generation functionality mayexecute in kernel space 806 and the diagnostic heartbeat analysisfunctionality may execute in user space 804, or vice versa. Of coursethe functionality of component 810 or 812 can be distributed in otherways as may be suitable in a given implementation within the scope ofthe illustrative embodiments.

In an embodiment, component 810 or 812 can send a mix of diagnosticheartbeat packets and basic heartbeat packets to a heartbeatingcomponent, such as to heartbeating component 706 in FIG. 7. Furthermore,component 810 or 812 can determine a ratio of a number of basicheartbeat packets and a number of diagnostic heartbeat packets to sendwithin a given time period. Based on the ratio, component 810 or 812 candetermine when to send a diagnostic heartbeat packet and when to send abasic heartbeat packet. For example, in one embodiment, when thediagnostic heartbeat packets and the basic heartbeat packets are to besent in equal numbers, component 810 or 812 sends a diagnostic heartbeatpacket and a basic heartbeat packet alternately. As another example, inanother embodiment, when twice as many diagnostic heartbeat packets areto be sent as the number of basic heartbeat packets, component 810 or812 sends a pattern of two diagnostic heartbeat packets followed by onebasic heartbeat packet in a given period.

With reference to FIG. 9, this figure depicts a block diagram of aregistration process for distributing diagnostic information and memberstate information in a domain in accordance with an illustrativeembodiment. Client application 902 may be similar to any of clientapplications 416, 418, 420, or 422 in FIG. 4. Distributed applicationinstance 904 may be analogous to any of distributed applicationinstances 408 or 412 in FIG. 4. Messaging infrastructure 906 may be anembodiment of messaging infrastructure 702 in FIG. 7. Membershipinformation 908 is similar to membership information 704 in FIG. 7 andincludes state information 910 as described earlier with respect to FIG.6. State information includes diagnostic attributes 912 or informationderived there from as previously described with respect to otherembodiments.

Client application 902 registers with messaging infrastructure 906 toreceive state information 910. For example, client application 902 mayregister to receive the current status, performance metrics, and knownsoft error conditions across the domain, as obtained from diagnosticattributes of diagnostic heartbeat packets.

Client application 902 may alternatively subscribe to messaginginfrastructure 906 to receive specific state information about members,state information about specific members, or a combination thereof. Forexample, client application 902 may subscribe to messaginginfrastructure 906 to receive the current status, performance metrics,and known soft error conditions of only those links that can process UDPpackets of size greater than 4 KB, as obtained from diagnosticattributes of diagnostic heartbeat packets.

In response to the registration or subscription, messaginginfrastructure 906 sends client application 902 the information thatclient application 902 requested. Information sent to client application902 in response to the registration or subscription may be only thecurrent state information based on recently received diagnosticattributes, the historic state information, or a combination thereof.

Additionally, (not shown), client application 902 may, through theregistration or subscription process, provide messaging infrastructure906 client application 902's quality of service (QoS) requirement. Forexample, client application 902 may specify in a registration (orsubscription) that client application 902 uses UDP packets, whichinclude a signature (bit pattern), the packets being of sizes 4 KB to 6KB, or some combination thereof. As another example, client application902 may specify in a registration (or subscription) that the datatraffic of client application 902 should only be placed on a link thathas not experienced a soft network error related to packet sizelimitation in the past thirty days. Of course, when a reason for a softnetwork error on a link has been remedied, such as when a faulty networkcable has been replaced, the history of soft network errors on that linkcan be edited or reset so that the link is available sooner in responseto such QoS specification.

Such QoS specification, performance demand, service restrictions, andother similarly purposed information in the registration (orsubscription) process enables messaging infrastructure 906 toefficiently match data traffic to a link in the domain. For example,messaging infrastructure 906 may be able to use such information topreemptively transfer client application 902's data traffic from onelink to another when a previously used link experiences a soft networkerror and fails to meet client application 902's specified requirements.

As another example, messaging infrastructure 906 may use suchinformation to allocate client application 902's data traffic to anadapter that meets client application 902's requirements, the adapternot necessarily being the best performing adapter available. Thus, suchinformation is useful in optimally utilizing the available memberresources without over-burdening the resources with better than athreshold performance and under-utilizing resources with less than thethreshold level of performance.

Distributed application instance 904 registers or subscribes in a mannersimilar to that described with respect to client application 902.Distributed application instance 904 provides QoS specification,performance demand, service restrictions, and other similarly purposedinformation in the registration (or subscription) to messaginginfrastructure 906 in a similar manner as client application 902.Messaging infrastructure 906 processes and uses such information fromdistributed application instance 904 in a manner similar to the abovedescription with respect to client application 902.

With respect to FIG. 10, this figure depicts a block diagram of animproved messaging infrastructure for reliable peer-to-peercommunication in accordance with an illustrative embodiment. Messaginginfrastructure 1002 includes certain improvements over messaginginfrastructure 906 in FIG. 9 as described herein, and is usable asmessaging infrastructure 906 in FIG. 9. State information 1004 includingdiagnostic attributes 1006 is similar to state information 910 includingdiagnostic attributes 912 in FIG. 9.

Reliable messaging component 1008 is a component to ensure that domainsynchronization is accomplished with a higher priority and transparencyover application data communication. Particularly, component 1008ensures that in the event of a hardware failure in a domain membercomponent or a soft network error, synchronization messages are passedto the member nodes in the domain without additional impediment ordelay.

As described herein, soft network errors can be detected usingdiagnostic heartbeat packets in combination with basic heartbeatpackets. Diagnostic attributes 1006 reveal the soft network errorconditions to component 1008. Component 1008 utilizes this informationabout the soft network errors and re-routes the synchronization messagesover other healthy adapters or links. Such re-routing can be automatic,proactive, responsive to additional policies or conditions, or acombination thereof.

With reference to FIG. 11, this figure depicts a block diagram ofanother improved messaging infrastructure for reliable peer-to-peercommunication in accordance with an illustrative embodiment. Messaginginfrastructure 1102 includes certain improvements over messaginginfrastructure 1002 in FIG. 10 as described herein, and is usable asmessaging infrastructure 1002 in FIG. 10. State information 1104including diagnostic attributes 1106 is similar to state information1004 including diagnostic attributes 1006 in FIG. 10.

Adaptive component 1108 is a component that ensures that diagnosticheartbeat packets do not cause congestion in the network or performancedegradation of the distributed peer-to-peer communication services. Toensure that the peer-to-peer communication services perform at or abovea specified service level, adaptive component 1108 can throttle thefrequency of diagnostic heartbeat packets in the general domain, or overa specific link. For example, if a distributed application instanceregisters with messaging infrastructure 1102 and informs that thedistributed application instance will use a particular IP address forthe distributed application instance's data communications, messaginginfrastructure 1102 can determine from the membership information thatadapter “A”, which is associated with the requested IP address, will bein use for the distributed application instance. Accordingly, adaptivecomponent 1108 can throttle back (reduce) the diagnostic heartbeating onthe links involving adapter “A” to provide more bandwidth for thedistributed application instance's use.

A change of heartbeating frequency by the sender, throttling orspeed-up, implies a change of expected heartbeat frequency in thereceivers. In one embodiment, this frequency change is communicated by adistributed protocol among the sender and all receivers. In anotherembodiment, the frequency change relies on the receivers changing themaximum timeout for which to tolerate not receiving a heartbeat of giventype adaptively. For example, when the network is congested, and asending thread cannot execute at the expected rate, adaptive change ofmaximum timeout is a gradual process such that a receiving adapter canobserve the network conditions to automatically increase or decrease thetimeout.

As another example, adaptive component 1108 can combine severaldiagnostic heartbeat packets together to reduce the frequency ofdiagnostic heartbeating. As an example, several diagnostic heartbeatpackets can be combined by combining the diagnostic attributes of theseveral diagnostic heartbeat packets into one diagnostic heartbeatpacket, combining the data payload to ensure that the combined datapayload of the one diagnostic heartbeat packet meets the diagnosticrequirements of the combined diagnostic heartbeat packets.

Adaptive component 1108 can implement frequency throttling anddiagnostic heartbeat packet combining techniques together or in somecombination to provide desired service levels from the membercomponents. Furthermore, adaptive component 1108 can employ logic toadapt the diagnostic heartbeating not only according to theregistrations, subscriptions, and current state information, but alsobased on historical state information 1110. For example, historicalstate information 1110 may reveal that between 12 AM and 2 AM eachnight, a distributed instance of a database on a particular node in thedomain sends a large volume of data traffic to adapter “A”, perhaps asthe database performs a nightly backup. Adaptive component 1108 canreduce the frequency of diagnostic heartbeating to or from adapter Aduring that period to minimize the degradation of adapter A'sperformance. As another example, in an embodiment, adaptive component1108 monitors a workload queue, such as a scheduler's job queue or adevice driver's send queue, to anticipate a change in utilization of amember component. Adaptive component 1108 can increase or decrease thefrequency of diagnostic heartbeating according to the direction of theutilization change, if the change does occur.

The embodiments improve certain components of a reliable peer-to-peercommunication system in different ways. For any given component, not allimprovements are necessary to practice any particular embodiment. Forexample, an implementation of a messaging infrastructure may include anysuitable combination of the different features of the differentconfigurations of messaging infrastructure as described in differentembodiments herein within the scope of the invention.

With reference to FIG. 12, this figure depicts a block diagram of animproved client application in accordance with an illustrativeembodiment. Client application 1202 may be usable as client application902 in FIG. 9.

Client application 1202 includes registration and subscription component1204. Component 1204 sends the registration or subscription forreceiving all or a subset of the state information about the domainmembers. As described elsewhere in this disclosure, component 1204 mayprepare and send a registration to an improved messaging infrastructureof an embodiment to receive the current or historic state information,including diagnostic information, about the domain members. As alsodescribed elsewhere in this disclosure, component 1204 may prepare andsend a subscription to an improved messaging infrastructure of anembodiment to receive specific current or historic state information,including diagnostic information, about specific domain members.

With reference to FIG. 13, this figure depicts a block diagram of animproved client application in accordance with an illustrativeembodiment. Client application 1302 may be usable as client application1202 in FIG. 12.

Client application 1302 includes preemptive traffic re-routing component1304. Component 1304 uses the state information and associateddiagnostic information received in response to a registration orsubscription to determine current or historical patterns of soft networkerrors. Using the information determined about the soft network errors,component 1304 can send a revised QoS specification or performancedemand to a messaging infrastructure to ensure that the domaincomponents currently experiencing or likely to experience soft networkerrors are avoided. Alternatively, to achieve a similar result,component 1304 can send a request to the messaging infrastructure toroute client application 1302's data traffic to selected adapter, link,or path 1306.

With reference to FIG. 14, this figure depicts a block diagram of animproved distributed application instance in accordance with anillustrative embodiment. Distributed application instance 1402 may beusable as distributed application instance 904 in FIG. 9.

Distributed application instance 1402 includes registration andsubscription component 1404. Component 1404 sends the registration orsubscription for receiving all or a subset of the state informationabout the domain members. As described elsewhere in this disclosure,component 1404 may prepare and send a registration to an improvedmessaging infrastructure of an embodiment to receive the current orhistoric state information, including diagnostic information, about thedomain members. As also described elsewhere in this disclosure,component 1404 may prepare and send a subscription to an improvedmessaging infrastructure of an embodiment to receive specific current orhistoric state information, including diagnostic information, aboutspecific domain members.

With reference to FIG. 15, this figure depicts a block diagram of animproved distributed application instance in accordance with anillustrative embodiment. Distributed application instance 1502 may beusable as distributed application instance 1402 in FIG. 14.

Distributed application instance 1502 includes preemptive trafficre-routing component 1504. Component 1504 uses the state information andassociated diagnostic information received in response to a registrationor subscription to determine current or historical patterns of softnetwork errors. Using the information determined about the soft networkerrors, component 1504 can send a revised QoS specification orperformance demand to an improved messaging infrastructure of anembodiment to ensure that the domain components currently experiencingor likely to experience soft network errors are avoided. Alternatively,to achieve a similar result, component 1504 can send a request to themessaging infrastructure to route distributed application instance1502's data traffic to selected adapter, link, or path 1506.

With reference to FIG. 16, this figure depicts a block diagram of animproved administration application for administrating distributedapplications in accordance with an illustrative embodiment.Administration application 1602, which is an example of administrationapplication 103 in FIG. 1, may register with or subscribe to a messaginginfrastructure in a manner similar to client application 902 in FIG. 9.

Administration application 1602 includes registration and subscriptioncomponent 1604. Component 1604 sends the registration or subscriptionfor receiving all or a subset of the state information about the domainmembers. As described elsewhere in this disclosure, component 1604prepares and sends a registration to an improved messaginginfrastructure of an embodiment to receive the current or historic stateinformation, including diagnostic information, about the domain members.As also described elsewhere in this disclosure, component 1604 preparesand sends a subscription to an improved messaging infrastructure of anembodiment to receive specific current or historic state information,including diagnostic information, about specific domain members.

With reference to FIG. 17, this figure depicts a block diagram of animproved administration application for administrating distributedapplications in accordance with an illustrative embodiment.Administration application 1702 uses an improved messaginginfrastructure of an embodiment in a manner similar to clientapplication 902 in FIG. 9. Administration application 1702, which is anexample of administration application 103 in FIG. 1, may be usable asadministration application 1602 in FIG. 16.

Administration application 1702 includes preemptive node reallocationcomponent 1704. Component 1704 uses the state information and associateddiagnostic information received in response to a registration orsubscription to determine current or historical patterns of soft networkerrors. Using the information determined about the soft network errors,component 1704 can relocate a distributed application instance under itsadministration to another node 1706 in the domain to ensure that thedomain components currently experiencing or likely to experience softnetwork errors are avoided. Alternatively, to achieve a similar result,component 1704 can send a request (not shown) to the messaginginfrastructure to route an affected distributed application instance'sdata traffic to a selected adapter, link, or path.

With reference to FIG. 18, this figure depicts a flowchart of an exampleprocess of specifying a diagnostic heartbeat packet in accordance withan illustrative embodiment. Process 1800 may be implemented in acomponent of an improved messaging infrastructure of an embodiment, suchas in heartbeating component 706 in FIG. 7.

The component determines a packet size of a diagnostic heartbeat packet(block 1802). The component selects a set of diagnostic attributes toinclude in the diagnostic heartbeat packet (block 1804). The componentselects a protocol to use for transmitting the diagnostic heartbeatpacket (block 1806). The component specifies the diagnostic heartbeatpacket to be constructed in a request (block 1808). Process 1800 endsthereafter.

The determinations and selections of blocks 1802, 1804, and 1806 can beused in any combination within the scope of an embodiment. For example,within the scope of the illustrative embodiments, a particularimplementation may omit selecting a protocol, allowing a defaultprotocol type to be used instead. Furthermore, an implementation may addan additional step of specifying the values of a subset of the set ofdiagnostic attributes and allowing a default value selection for theother remaining diagnostic attributes in the set. A set of diagnosticattributes is one or more diagnostic attributes.

With reference to FIG. 19A, this figure depicts a flowchart of anexample process of throttling diagnostic heartbeating in accordance withan illustrative embodiment. Process 1900 may be implemented in acomponent of a messaging infrastructure, such as in adaptive component1108 in FIG. 11.

The component determines a frequency of diagnostic heartbeats for agiven adapter or a link (block 1902). For example, the component mayselect the frequency to reduce the overhead caused by the diagnosticheartbeat packets on a link for which a client application has indicateda preference. The component sends the diagnostic heartbeat packets atthe selected frequency on the given adapter or link (block 1904).Process 1900 ends thereafter. The frequency change may be communicatedby a distributed protocol among the sender and receivers, or a receivermay change the maximum timeout for which to tolerate not receiving aheartbeat of given type adaptively as described earlier.

With reference to FIG. 19B, this figure depicts a flowchart of anotherexample process of throttling diagnostic heartbeating in accordance withan illustrative embodiment. Process 1950 may be implemented in acomponent of a messaging infrastructure, such as in adaptive component1108 in FIG. 11.

The component determines a reduced frequency of diagnostic heartbeatsfor a given adapter or a link (block 1952). The component combinesseveral diagnostic heartbeat packets into a single diagnostic heartbeatpacket (block 1954). The component sends the combined diagnosticheartbeat packet at the reduced frequency on the given adapter or link(block 1956). Process 1950 ends thereafter. The frequency change may becommunicated by a distributed protocol among the sender and receivers,or a receiver may change the maximum timeout for which to tolerate notreceiving a heartbeat of given type adaptively as described earlier.

With reference to FIG. 20, this figure depicts a flowchart of an exampleprocess of detecting a soft network error condition in accordance withan illustrative embodiment. Process 2000 may be implemented in acomponent of an improved messaging infrastructure of an embodiment, suchas in heartbeating component 706 in FIG. 7.

The component receives a diagnostic heartbeat packet (block 2002). Thecomponent analyzes one or more diagnostic attributes in the diagnosticheartbeat packet to detect a soft network error (block 2004). Based onthe analysis, the component updates a state information record using thediagnostic attribute values to indicate the soft network error condition(block 2006). Process 2000 ends thereafter.

In one embodiment, the component analyzes the header information in thediagnostic heartbeat packet to determine a source, a target, and certaindiagnostic attributes. The component then compares the diagnosticattributes with corresponding diagnostic attributes stored in the stateinformation record for the link from adapter A to adapter B. Based onthe analysis, block 2006 may update the state information record, suchas when the value for a particular diagnostic attribute reflects animprovement in a condition of the link between adapters A and B. Thus,the component can detect not only soft network error conditions, butalso network condition improvements using the diagnostic heartbeats.

As another example, assume that a diagnostic heartbeat packet of size 4KB was sent over UDP from adapter A to adapter B but the stateinformation record contains a length of 2K as largest value for whichthere exists connectivity for UDP packets sent from adapter A to adapterB. The component can update the state information record with the newvalue of 4 KB for protocol type UDP and the link from adapter A toadapter B. As another example, the diagnostic attributes may indicate abit pattern that is not yet stored in the state information record forthe link from adapter A to adapter B. The component, at block 2006, canupdate the state information record to add information indicating thatthere exists connectivity with regards to the bit pattern.

Alternatively, under certain circumstances, at the beginning of process2000, the component may detect a failure to receive, within an allowedtime-out, diagnostic heartbeats having a given set of diagnosticattributes (block 2003). Generally, the maximum time-out value for whichto tolerate a failure to send receive heartbeats before declaring afailure of connectivity is specific to the given set of attributesincorporated in the diagnostic heartbeat. For example, the component maydetect that no diagnostic heartbeat of the set of attributes consistingof packet size and UDP protocol type has been received for a time periodexceeding the maximum allowed time-out specific to that pair ofattributes.

Following block 2003, the component omits block 2004 and proceeds toexecute block 2006. Process 2000 ends thereafter. For the above example,the component may update the state information record for a link fromadapter A to adapter B to reflect loss of connectivity with regards tothe currently stored attribute value for packet size and protocol typeUDP.

In an embodiment, process paths 2003-2006 and 2002-2004-2006 operate inconjunction to update the state information record, such as for theexample link from adapter A to adapter B, to ensure that the recordcontains the maximum values of the diagnostic attributes for whichdiagnostic heartbeat transmission from adapter A to adapter B issuccessful. In the embodiment, the link is considered to be adverselyaffected by a soft network error, if at least one attribute in the stateinformation record is not set at a corresponding maximum value. Forexample, if the embodiment tests the link from adapter A to adapter Bfor packet transmissions with a size up to 8 KB for packet type UDP, andthe value stored in the state information record for attributes packetsize and UDP is 4 KB, then the link from adapter A to adapter B isdeemed to be adversely affected by a soft network error.

With reference to FIG. 21, this figure depicts a flowchart of an exampleprocess of historically tracking soft network error conditions in adistributed domain in accordance with an illustrative embodiment.Process 2100 may be implemented in a component of a messaginginfrastructure, such as in heartbeating component 706 in FIG. 7.

The component receives diagnostic heartbeat packets from the variousmember adapters and other domain member components (block 2102). Thecomponent updates the state information of the adapters and other membercomponents based on the diagnostic attribute values found in thediagnostic heartbeat packets (block 2104). The component adds theupdated state information to a historical record of the stateinformation of those adapters and other member components (block 2106).Process 2100 ends thereafter.

With reference to FIG. 22, this figure depicts a flowchart of an exampleprocess of registration or subscription in accordance with anillustrative embodiment. Process 2200 may be implemented in an improvedmessaging infrastructure, such as in messaging infrastructure 1102 inFIG. 11.

The improved messaging infrastructure receives from a client applicationor a distributed application instance a registration to receive stateinformation available in the improved messaging infrastructure (block2202). The improved messaging infrastructure may additionally oralternatively also receive from a client application or a distributedapplication instance a subscription to receive specific stateinformation updates available in the improved messaging infrastructure(block 2204). A distributed application instance administrationapplication may also send a registration or a subscription in a similarmanner.

The improved messaging infrastructure provides the requested stateinformation to the requesting entity (block 2206). The improvedmessaging infrastructure may additionally adjust a diagnosticheartbeating frequency according to the registration or subscriptioninformation (block 2208). For example, the improved messaginginfrastructure may reduce the diagnostic heartbeating frequency on anadapter to which a distributed application instance has subscribed, as apreemptive move to reduce overhead on an adapter that is likely to beused in the near future. As another example, if a particular link oradapter is not subscribed to, the improved messaging infrastructure mayopportunistically increase the diagnostic activity on such a link inanticipation of low utilization in the near future.

Conversely, under some circumstances, the reverse operation may bedesirable. For example, the improved messaging infrastructure mayincrease the diagnostic activity on a link that is subscribed to detectany soft network errors that could adversely affect the busy link, andvice versa. The adjusted frequency may serve as an input to the adaptivecomponent of the improved messaging infrastructure as describedelsewhere in this disclosure. Process 2200 ends thereafter.

With reference to FIG. 23, this figure depicts a flowchart of an exampleprocess of soft network error condition aware data routing in accordancewith an illustrative embodiment. Process 2300 may be implemented in animproved messaging infrastructure, such as in messaging infrastructure1100 in FIG. 11.

The improved messaging infrastructure receives a request selecting anadapter or a link on which to place the requestor's data traffic (block2302). In one embodiment, the request in block 2302 may be for selectinga node on which to locate or relocate a distributed applicationinstance.

The improved messaging infrastructure configures the data routinginformation so that the traffic of the requestor may be routed to thedesired adapter or link (block 2304). When the request is to relocate adistributed application instance to a node, the improved messaginginfrastructure may configure the routing information so that the datatraffic to and from the distributed application instance can be realizedat the requested node.

The improved messaging infrastructure may additionally adjust adiagnostic heartbeating frequency according to the reallocation of datatraffic to the specific adapter, link, or node (block 2306). Forexample, the improved messaging infrastructure may reduce the diagnosticheartbeating frequency on the selected adapter, link, or node so as toreduce the overhead on now busier adapter, link, or node. The reducedfrequency may serve as an input to the adaptive component of theimproved messaging infrastructure as described elsewhere in thisdisclosure. Process 2300 ends thereafter.

With reference to FIG. 24, this figure depicts a flowchart of an exampleprocess of circumventing a soft network error condition in accordancewith an illustrative embodiment. Process 2400 may be implemented in acomponent of an improved messaging infrastructure of an embodiment, suchas in reliable messaging component 1008 in FIG. 10.

The component receives diagnostic information, such as from a stateinformation record that stores performance metrics and soft networkerror condition indicators as described elsewhere in the disclosure(block 2402). The component determines, such as by analyzing thediagnostic attributes available from the state information record, thata soft network error condition exists in the domain (block 2404).

Note that what may not be a soft network error condition for one purposemay be a soft network error condition for another purpose. For example,if a distributed application instance never uses UDP, and neversubscribes to protocol related diagnostics from an improved messaginginfrastructure of an embodiment, as far as the distributed applicationinstance is concerned, no soft network error condition exists in thedomain. A different analysis, such as for process 2400, which mayutilize UDP, may reveal that a soft network error condition does existbecause the second analysis utilizes the protocol diagnostics.

The component re-routes the synchronization messages from a link withthe soft network error to another, more reliable, link (block 2406).Process 2400 ends thereafter.

With reference to FIG. 25, this figure depicts a flowchart of anotherexample process of circumventing a soft network error condition inaccordance with an illustrative embodiment. Process 2500 may beimplemented in a client application, such as in preemptive trafficre-routing component 1304 in FIG. 13. Process 2500 may also beimplemented in a distributed application instance, such as in preemptivetraffic re-routing component 1504 in FIG. 15.

The component receives all or part of the state information according toa registration or subscription (block 2502). The component detects asoft network error condition using the received state information andpreemptively moves the network traffic of the associated clientapplication or distributed application instance to a member component,such as a link, selected based on the received state information (block2504). Process 2500 ends thereafter.

With reference to FIG. 26, this figure depicts a flowchart of anotherexample process of mitigating the effects of a soft network errorcondition in accordance with an illustrative embodiment. Process 2600may be implemented in an improved messaging infrastructure, such as inmessaging infrastructure 1102 in FIG. 11.

The improved messaging infrastructure receives performance requirements,such as QoS specifications, from a client application or a distributedapplication instance (block 2602). The improved messaging infrastructureselects a suitable member component of the domain, such as a suitableadapter or link, using a combination of the current and the historicalstate information, to meet the performance requirements (block 2604).The selection of block 2604 need not necessarily select the bestperforming member component but a component of suitable performance andavailability to satisfy the performance requirements received in block2602.

The improved messaging infrastructure allocates the requesting entity'straffic to the selected member component (block 2606). Process 2600 endsthereafter.

With reference to FIG. 27, this figure depicts a flowchart of anotherexample process of detecting a soft network error condition andmitigating the error's effects in accordance with an illustrativeembodiment. Process 2700 may be implemented in an improved messaginginfrastructure, such as in messaging infrastructure 1102 in FIG. 11.

In one embodiment, the improved messaging infrastructure receives adiagnostic heartbeat packet from an adapter (block 2702). In anotherembodiment, the improved messaging infrastructure detects a failure toreceive diagnostic heartbeats having a given set of diagnosticattributes within an allowed time-out (block 2703). Several methods todetect a failure of a diagnostic heartbeat have been described withrespect to block 2003 in FIG. 20, and are similarly applicable forexecuting block 2703.

Using the received diagnostic heartbeat packet of block 2702, or basedon the failure to receive the diagnostic heartbeat packet as in block2703, the improved messaging infrastructure determines that a previouslystable value of a diagnostic attribute has changed (block 2704). Theimproved messaging infrastructure identifies a soft network errorcondition based on the changed value (block 2706). The improvedmessaging infrastructure adjusts a future diagnostic heartbeat packet toidentify a new stable value of the diagnostic attribute (block 2708).The improved messaging infrastructure adjusts or updates a performancemetric of the adapter, links associated with the adapter, or both, inthe state information using the detected soft network error condition(block 2710). Process 2700 ends thereafter.

The operation of process 1800, 1900, 1950, 2000, and 2700, and otheroperations using diagnostic heartbeat packets as described herein arenow described with respect to an example implementation. The details ofthe example implementation are not intended to be limiting on theillustrative embodiments. Those of ordinary skill in the art will beable to conceive other implementation details, variations, or additionsthereto. Such modifications are contemplated within the scope of theillustrative embodiments.

1. Logical Subnet Partition of a Domain, Heartbeat Signature andTunables

1.A) Adapters of a domain are divided into logical subnets that reflectphysical network connectivity. All adapters of a logical subnet are ofthe same architecture, for instance Ethernet or Fibre Channel and partof the same physical network.

1.B) A heartbeat signature is a sequence of sets of heartbeat packetsH1, . . . , Hn whereby each set Hi has a format specified by a set ofattributes, including packet size, protocol type, bit pattern. For agiven set Hi, multiple instances of heartbeat signatures may exist withvarying attribute values. For example, Hi may be set of UDP packets withbit pattern 1010 . . . 1010 in a range of sizes. A basic heartbeatsignature consists of basic heartbeats. As described, these areheartbeats that have invariable attribute values, for instance fixedsize. A diagnostic heartbeat signature consists of heartbeats that mayhave variable attribute values, for instance variable size.

1.C) A heartbeat signature has heartbeat tunables associated with it, inparticular:

Tunables for Basic Heartbeat Signature:

Heartbeat Frequency

The frequency with which basic heartbeats are sent, the same frequencyfor all heartbeats of the signature.

Heartbeat Grace Period

The maximum period for which a basic heartbeat of given attribute maynot be received before declaring heartbeat connectivity with regards tothat attribute as failed.

Heartbeat frequency for auto discovery of connectivity for failedheartbeats

If for a given basic heartbeat, Hi, heartbeating establishes noconnectivity with any recipient, heartbeats Hi need to be sent outperiodically to rediscover if connectivity with regards to attributevalues of Hi has been restored. Such packets add further network loadand a tunable frequency for such packets it desirable.

Tunables for Diagnostics Heartbeat Signature:

Heartbeat Frequency

The frequency with which diagnostic heartbeats are sent, the samefrequency for all heartbeats of the signature.

Heartbeat Grace Period

The maximum period for which a diagnostics heartbeat of given attributevalue may not be received before declaring heartbeat connectivity withregards to that attribute value as failed.

Heartbeat frequency for auto discovery of connectivity with optimalvalue for heartbeats of degraded attribute value

If for a given attribute heartbeating establishes connectivity with avalue below the optimal one, heartbeats of higher value need to be sentout periodically to rediscover if connectivity with a higher value hasbeen restored.

1.D) Each logical subnet has multiple heartbeat signatures associated,that may change dynamically. That is, heartbeats on a given subnet aremanaged with tunables that are not uniform. In particular, heartbeatssignatures of the following categories may be active on a subnet:

i.) basic_active—basic signature heartbeats, sent while the path has notbeen declared as failed

ii.) basic_retry—basic signature heartbeats, sent to retry theconnection after detected failure

iii.) diag_active—diagnostics signature heartbeats, sent with dynamicattributes while the path has not been declared as failed with regardsto these attributes

iv.) diag_retry—diagnostic heartbeats, retry of attributes afterdetected failure of connectivity with regards to these attributes

1.E) Heartbeat signatures and tunables may be dynamically changed, suchas to react to client demands or increased network bandwidth usage byclients.

1.F) Clients may use different heartbeat signatures and tunables perlogical subnet to monitor network properties specific to the intendeduse of a network connection by an application.

2. Presentation of Adapter State Information

2.A) The membership component of the peer-to-peer communication systemimplements monitoring for a given set of attributes, attr_1, . . . ,attr_n, as described elsewhere in the disclosure. Attributes representcharacteristics of heartbeat packets, such as packet size, TCP/IPprotocol type or a bit pattern. As stated, multiple attributes may beassociated with one heartbeat packet. The value of an attribute is aninteger, according to a metric specific to attr_i, for instance packetsize, or bit pattern encoded by a number.

2.B) The range of possible values for attributes is not the same forbasic heartbeat signatures and diagnostic heartbeat signatures:

Attributes of the basic heartbeat signatures can have values 1 and 0,indicating connectivity or no connectivity with regards to an attributetype which fixes value, such as UDP packets of size 128 bytes.

Attributes of the diagnostic heartbeat signature may have a range ofinteger values.

2.C) Each adapter, Ai, receives heartbeats from a subset of adapters ofthe same logical subnet, {Ail, . . . , Ain}. For each adapter Ail fromwhich Ai receives heartbeats, it maintains a vector of attribute values,

attr(Ail)={attr_1(1(Ail)), . . . , attr_k(Ail))}.

2.D) The attribute values attr_j(Ai) are updated according to receipt ofheartbeats of the type represented by the attribute and externalized toclients.

3. Presentation of Attribute Specific Network State

State of heartbeat connectivity is broadcast by all listeners andresults are stored by each member in the attribute enriched routingtable. Routing information can be derived from the connectivity matrixand queries like the below are supported by the API:

3.A) Find adapters in any or a given logical subnet that haveconnectivity with relation to a given set of attribute values attr_1, .. . , attr_n. For instance, find a set of adapters that are able toexchange packets of minimum size x.

3.B) For a given logical subnet, display attribute values with regardsto which connectivity of adapters exists.

4. Embodiment of a Heartbeating Component of Fixed Heartbeating Topology

In the following we outline management of heartbeat attributes andadapter state information in a membership component

4.1 Heartbeating

A.) A distinguished heartbeat signature exists that is suited to testbasic network connectivity as described earlier. This heartbeatsignature contains a sequence of heartbeats of which is assumed that ifan adapter is able to receive from a neighbor any heartbeat of a givenattribute, then it will be able to receive a subset of heartbeats of H1,. . . , Hn and thus receipt of any heartbeat of that set is proof thatthe remote adapter is alive. Receiving such distinguished heartbeats canbe thought of as a prerequisite to receive other heartbeats and is amean to detect most accurately if a remote member is alive and hence todeduce most accurately domain membership.

B.) For each logical subnet, three distinguished heartbeat signaturesexist, for the following purposes:

B.1) Initialization: When heartbeating is started, for applicableattributes a range of values may be sent such as packets of various sizefor receivers to be able to determine a maximum packet size.

B.2) Heartbeating: The signature for heartbeating that is used once astable set of network attributes has been established.

B.3) Stabilization after State Change: Once heartbeats of a stableattribute value are no longer received, a heartbeat signature with avariation of value for that attribute is sent, to establish the newmaximum value for that attribute.

4.2 Protocols

A.) Initialization—entails mediation of a best possible set of attributevalues sent during heartbeating. Attribute values are assumed to beassigned such that the highest value is the best value.

1. Adapter A sends heartbeats according to configured heartbeatsignatures basic_active and diag_active to its set of listeners. For agiven heartbeat of diag_active, packets with all attribute values aresent.

2. The listeners acknowledge receipt of a heartbeat, Hi, of basic ordiagnostic type by sending an ACK back to sender A.

3. Sender A does the following upon receipt of heartbeat ACK responsesfrom listeners:

3.A) Based on the set of attribute values received by senders for whichconnectivity exists, it forms the four heartbeat signatures described in1.D, which are called the stable active signature. The diag_activesignature may contain for a given heartbeat multiple instances withdifferent attribute values, the maximum for which each listeneracknowledged receipt.

3.B) Sender A maintains a list per listener which specifies for whichattribute value connectivity exists and based on that builds the retrysignatures 1.D.ii and 1.D.iv as follows:

basic_retry—contains heartbeats not in basic_active

diag_retry—contains for each heartbeat that has an instance that is notat maximum value for a listener a instance of attribute value one abovethe current value in diag_active

4. Sender A sends the stable active signature to its set of listeners.

5. Listeners publish the state with regards to monitored attributes tothe reliable messaging component and to clients as follows:

Each listener broadcasts values for heartbeat connectivity from thesender, using packets of basic heartbeat format of all applicableattributes.

Each recipient of a broadcast will add that state information to itslocal network connectivity matrix.

B.) Heartbeating—entails sending heartbeats according to heartbeatsignatures in 1.D) that have been determined during initialization. Asstated in 1.D) above, not all heartbeats of the collated signature mayhave the same tunables.

1. Adapter A sends heartbeats signatures as described in 1.D) above withconfigured frequencies.

2. The recipients listen for heartbeats. If a recipient detects a statechange, i.e., either failure to receive a heartbeat for its associatedgrace period or that the recipient again receives heartbeats withattributes that are not part of the current state signature, therecipient initiates a protocol by notifying sender A.

3. The Stabilization after State Change protocol, described in 4.2.Cbelow is executed. In response to a change in the networkconfigurations, multiple iterations of described protocol may beexecuted until a new stable heartbeat signature has been mediated.

C.) Stabilization after State Change

Upon receipt of a notification as described in 4.2.B.2 Sender A will dothe following:

1.) If notification that a heartbeat, Hi, of any active heartbeatsignature, 4.2.D.1 or 4.2.D.3 is not received, sender A will do thefollowing:

1.A) Update list 4.2.A.3.B

1.B) If Hi belongs to a basic signature, do the following:

If Hi is not received any longer by any listener, Hi will be removedfrom the basic_active and added to the basic_retry signature.

1.C) If H1 belongs to a diagnostics signature and its attribute value isequal or larger than values for the attribute received by any otherlistener according to list 4.2.A.3.B, diagnostics heartbeatingsignatures are changed as follows:

An instance of heartbeat Hi is added with its next lower attribute valuein the diag_active signature, or if Hi already had been at its minimumvalue removed from that signature.

An instance of the as failed detected attribute value of Hi is added tothe diag_retry signature.

2.) If response to a heartbeat, Hi, of any retry signature is receivedwith an attribute value that is larger than the currently known valuefor which connectivity exists, i.e. the value in the per listener andattribute connectivity list described in 4.2.A.3.B, sender A will do thefollowing:

2.A) Update list 4.2.A.3.B

2.B) If Hi belongs to a basic signature, do the following:

Add Hi to basic_active, if not present in that signature.

2.C) If Hi belongs to a diagnostics signature, and its attribute valueis equal or smaller than values for the attribute received by any otherlistener according to list 4.2.A.3.B, diagnostics heartbeatingsignatures are changed as follows:

An instance of heartbeat Hi is added with next higher attribute value todiag_active, if not already present.

An instance of heartbeat Hi is added with its next higher attributevalue to diag_retry, if not already present. If there is no instance ofHi below its maximum value, Hi is removed from that signature.

3. Listeners publish the new state with regards to monitored attributesto the reliable messaging component and to clients as described in4.2.A.4.

D.) Example of a state transitions in response to a soft network failure

1. Adapter A sends heartbeats with stable signature.

2. Listener Ai and Aj detect a failure to receive diagnostics heartbeatsof attribute values

attr_1(Ai)=ail and attr_1(Aj)=ajl.

3. Ai, Aj each send a packet to A, informing of failure to receive theattribute attr_1 with corresponding specified value.

4. A, upon receipt of notifications to receive attribute values ail,ajl, looks up if diag_active contains heartbeats with attribute valuesone step lower than ail, ajl, called ail_-1, ajl_-1, correspondingly andadds missing ones to the list. Further, A looks up if an instance ofeach heartbeat with values ail, ajl is in diag_retry and if not adds theinstance to the diag-retry.

5. A resumes heartbeating with that signatures.

6. Ai receives heartbeats with the new value ail_-1 and sends an ACK toA.

7. A sends a reply to Ai's ACK.

8. Ai publishes the new attribute ail_-1 for receipt of heartbeats fromA to the reliable messaging component and clients.

9. Aj does not receive heartbeats with the new value ajl_-1 and sends apacket to A, informing of failure to receive heartbeats with attributevalue ajl_-1.

10. A adds the next lower value for ajl_-1, that is ajl_-2, to thevalues signature and ajl_-1 to the diag_retry signature.

11. Aj receives the heartbeat with value ajl_-2 and sends an ACK to A.

12. A sends a reply to Aj's ACK.

13. Aj publishes the new attribute ajl_-2 for receipt of heartbeats fromA to the reliable messaging component and clients.

4.3 Maintenance of Membership and Logical Adapter State Information

Adapter state information is obtained as a result of receipt ofheartbeats with selected signature. Below is an example of externalizedadapter state information in raw format:

adapter: A1

listeners A11, . . . , A1 n

diagnostics monitored: packet_size, UDP, multicast, TCP, bitpattern_test

collated diagnostics: (packet size, UDP, bitpattern_test), (packet_size,TCP, bitpattern_test)

diagnostics range: size: min: 64, max: 8192, bit_pattern cycle size:2-8192

values by listeners: A11 A12 . . . A1 n

packet_size (UDP) max 128 . . . max

bit_pattern (UDP) 1 1 . . . 0

packet_size (TCP) max 1 . . . 1

bit_pattern (TCP) 1 1 . . . 0

tunables: frequency grace-period retry-frequency

basic: 2 10 8

diag: 8 32 48

4.4 Use of Adapter State Information by Reliable Messaging Component

The messaging infrastructure specifies monitoring of a set of logicalnetworks it will use to route its traffic and select heartbeatattributes for these networks according to its network trafficcharacteristics. If a change of network connectivity with regards tomonitored attributes affecting the currently used logical subnet hasbeen detected, the reliable messaging layer will switch to use anothersubnet to route its traffic or for a degradation of certain attributeschange its transmission characteristics, such as using smaller sizepackets.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

Thus, a computer implemented method, system, and computer programproduct are provided in the illustrative embodiments for improving adistributed application using diagnostic heartbeating.

The diagnostics system with the described properties of an embodimentsolves important problems in the implementation of reliable peer-to-peercommunication systems and distributed clients. Soft network failuresoccur frequently, and, as described above, they have a pervasive effecton the functionality of distributed middleware, applications, andclients. Failures or mis-configurations are detected and reacted to assoon as they occur, rather than being exposed as random applicationerrors and hangs that are expensive to diagnose via presently availablemethods. The integrated diagnostics infrastructure greatly reduces theneed to localize soft network errors by means of test tools for networkhardware, such as network sniffers, and internals knowledge of theclient and reliable messaging component.

A network configuration may have been fully functional at some point anda system passed all tests pertaining to reliable peer-to-peercommunications before deployment. A simple change in networking, such asreplacement of a cable, switch reboot, or change of switch port mayintroduce a soft network error. In conjunction with the network stresstest tool described elsewhere in the disclosure, the describeddiagnostics embodiments are particularly suited to assess networkconnectivity before restarting production, thus eliminating downtime.Tunables for maximum bandwidth used for diagnostic heartbeating allowsatisfying a range of requirements for performance and latency offailure detection of clients. It is further contemplated that anembodiment can be enhanced with a network stress test tool capable ofsending all heartbeat attribute combinations in all ranges that areusable for detecting soft network errors in distributed applicationsenvironments.

Furthermore, an embodiment is useful in a cloud environment forInfrastructure as a Service (IaaS) and Platform as a Service (PaaS)providers to comply with Service Level Agreements (SLAs). In a cloudsetting networks may span across an inhomogeneous network environment.An embodiment that implements heartbeat construction at lower layer inthe network device stack is more effective in diagnosing and reacting tosoft network failures as compared to an embodiment that observes networkprotocol errors in higher layers. Cloud platforms host applicationswhose network bandwidth characteristics are not necessarily known. Asoft network error may be exposed by network load. History informationabout soft network errors may be used by cloud providers to scheduleapplications to use certain networks.

An embodiment may be particularly beneficial in detecting soft networkerrors in low latency data processing environments. For example, in astock trading or brokerage application, a soft network error can cause atransaction to be delayed, which can result in unacceptable outcome ofthe transaction. In such low latency environments, predicting softnetwork errors, or detecting them earlier than presently possible helpsmeet the stringent service level requirements in those environments.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablestorage device(s) or computer readable media having computer readableprogram code embodied thereon.

Any combination of one or more computer readable storage device(s) orcomputer readable media may be utilized. The computer readable mediummay be a computer readable signal medium or a computer readable storagemedium. A computer readable storage device may be, for example, but notlimited to, an electronic, magnetic, optical, electromagnetic, infrared,or semiconductor system, apparatus, or device, or any suitablecombination of the foregoing. More specific examples (a non-exhaustivelist) of the computer readable storage device would include thefollowing: an electrical connection having one or more wires, a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), an optical fiber, a portable compact disc read-onlymemory (CD-ROM), an optical storage device, a magnetic storage device,or any suitable combination of the foregoing. In the context of thisdocument, a computer readable storage device may be any tangible deviceor medium that can contain, or store a program for use by or inconnection with an instruction execution system, apparatus, or device.

Program code embodied on a computer-readable storage device or computerreadable medium may be transmitted using any appropriate medium,including but not limited to wireless, wireline, optical fiber cable,RF, etc., or any suitable combination of the foregoing. The terms“computer-readable tangible storage device” and computer-readablestorage device” do not encompass a signal propagation medium such as acopper cable, optical fiber, or wireless transmission medium, anydescription in this disclosure to the contrary notwithstanding.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as JAVA programming language, Smalltalk, C++ or the like andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The program codemay execute entirely on the user's computer, partly on the user'scomputer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to one or more processors of one or more general purposecomputers, special purpose computers, or other programmable dataprocessing apparatuses to produce a machine, such that the instructions,which execute via the one or more processors of the computers or otherprogrammable data processing apparatuses, create means for implementingthe functions/acts specified in the flowchart and/or block diagram blockor blocks.

These computer program instructions may also be stored in one or morecomputer readable storage devices or computer readable media that candirect one or more computers, one or more other programmable dataprocessing apparatuses, or one or more other devices to function in aparticular manner, such that the instructions stored in the one or morecomputer readable storage devices or computer readable medium produce anarticle of manufacture including instructions which implement thefunction/act specified in the flowchart and/or block diagram block orblocks.

The computer program instructions may also be loaded onto one or morecomputers, one or more other programmable data processing apparatuses,or one or more other devices to cause a series of operational steps tobe performed on the one or more computers, one or more otherprogrammable data processing apparatuses, or one or more other devicesto produce a computer implemented process such that the instructionswhich execute on the one or more computers, one or more otherprogrammable data processing apparatuses, or one or more other devicesprovide processes for implementing the functions/acts specified in theflowchart and/or block diagram block or blocks.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. As used herein, a set includes one or more members unless thecontext indicates otherwise. It will be further understood that theterms “comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiments were chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A method for improving a distributed applicationusing diagnostic heartbeating, the method comprising: an application,executing using a processor and a memory in a first data processingsystem, sending a registration to a messaging component in the firstdata processing system, the registration requesting state informationfor a set of member components in a distributed domain; after theapplication sending the registration to the messaging component, theapplication receiving the state information from the messagingcomponent, the state information including current status and diagnosticinformation relating to the set of member components obtained fromdiagnostic attributes of diagnostic heartbeat packets received by themessaging component, wherein a diagnostic heartbeat packet is a packetcomprising a header, a set of heartbeat parameters, and a set ofdiagnostic attributes, wherein a basic heartbeat packet is a packetcomprising a second set of heartbeat parameters, a size of the basicheartbeat packet being specified in a heartbeat parameter in the secondset of heartbeat parameters, wherein the set of diagnostic attributes isconfigured to specify a combination of a packet size that is differentfrom the size of the basic heartbeat packet, a protocol being used totransmit the diagnostic heartbeat packet, and a specific bit patternused in the diagnostic heartbeat packet.
 2. The method of claim 1,further comprising: the application providing a quality of service (QoS)specification to the messaging component to enable the messagingcomponent to route a data packet from the application using a member ofthe distributed domain that satisfies the QoS specification according toa diagnostic attribute associated with the member.
 3. The method ofclaim 1, wherein the registration is a subscription to receive the stateinformation for a specific member of the distributed domain, furthercomprising: the application specifying to the messaging component acharacteristic of a data packet carrying a data payload of theapplication to enable the messaging component to identify a specificmember of the distributed domain as being able to satisfy thecharacteristic.
 4. The method of claim 1, further comprising: theapplication specifying to the messaging component a particular member ofthe distributed domain to which to route data traffic of theapplication; and the application selecting the particular member frommembers identified in the state information based on the diagnosticinformation relating to the particular member.
 5. The method of claim 1,wherein the diagnostic information includes performance metrics, andknown soft network error conditions relating to the set of membercomponents, wherein a soft network error condition is a network errorcondition that adversely affects transmission of packets having certainproperties in a data communication network.
 6. The method of claim 1,further comprising: after the application sending the registration tothe messaging component, the application receiving historical stateinformation from the messaging component, the historical stateinformation including historical status and historical diagnosticinformation relating to the set of member components obtained fromdiagnostic attributes of historical diagnostic heartbeat packetsreceived by the messaging component.
 7. The method of claim 1, whereinthe set of member components includes all member components in thedistributed domain that are tracked at the messaging component.
 8. Themethod of claim 1, wherein the application is an instance of adistributed application executing on the first data processing system,wherein the messaging component also executes on the first dataprocessing system.
 9. The method of claim 1, wherein the application isa client application using an instance of a distributed applicationexecuting on a second data processing system, wherein the messagingcomponent also executes on the second data processing system.
 10. Themethod of claim 1, wherein the application is a distributed applicationmanagement application managing an instance of a distributed applicationexecuting on a second data processing system, wherein the messagingcomponent also executes on the second data processing system.
 11. Themethod of claim 10, further comprising: the application deciding toreallocate the instance of the distributed application from the seconddata processing system to a third data processing system, wherein thedeciding is based on the diagnostic information relating to a secondmember associated with the second data processing system and thediagnostic information relating to a third member associated with thethird data processing system.
 12. A computer program product comprisingone or more computer-readable tangible storage devices andcomputer-readable program instructions which are stored on the one ormore storage devices and when executed by one or more processors,perform the method of claim
 1. 13. A computer system comprising one ormore processors, one or more computer-readable memories, one or morecomputer-readable tangible storage devices and program instructionswhich are stored on the one or more storage devices for execution by theone or more processors via the one or more memories and when executed bythe one or more processors perform the method of claim
 1. 14. A computerprogram product for improving a distributed application using diagnosticheartbeating, the computer program product comprising: one or morecomputer-readable tangible storage devices; program instructions, storedon at least one of the one or more storage devices, to send aregistration from an application to a messaging component in a firstdata processing system, the registration requesting state informationfor a set of member components in a distributed domain; programinstructions, stored on at least one of the one or more storage devices,to, after sending the registration from the application to the messagingcomponent, receive the state information at the application from themessaging component, the state information including current status anddiagnostic information relating to the set of member components obtainedfrom diagnostic attributes of diagnostic heartbeat packets received bythe messaging component, wherein a diagnostic heartbeat packet is apacket comprising a header, a set of heartbeat parameters, and a set ofdiagnostic attributes, wherein a basic heartbeat packet is a packetcomprising a second set of heartbeat parameters, a size of the basicheartbeat packet being specified in a heartbeat parameter in the secondset of heartbeat parameters, wherein the set of diagnostic attributes isconfigured to specify a combination of a packet size that is differentfrom the size of the basic heartbeat packet, a protocol being used totransmit the diagnostic heartbeat packet, and a specific bit patternused in the diagnostic heartbeat packet.
 15. The computer programproduct of claim 14, further comprising: program instructions, stored onat least one of the one or more storage devices, to provide from theapplication a quality of service (QoS) specification to the messagingcomponent to enable the messaging component to route a data packet fromthe application using a member of the distributed domain that satisfiesthe QoS specification according to a diagnostic attribute associatedwith the member.
 16. The computer program product of claim 14, whereinthe registration is a subscription to receive the state information fora specific member of the distributed domain, further comprising: programinstructions, stored on at least one of the one or more storage devices,to specify from the application to the messaging component acharacteristic of a data packet carrying a data payload of theapplication to enable the messaging component to identify the specificmember of the distributed domain as being able to satisfy thecharacteristic.
 17. The computer program product of claim 14, furthercomprising: program instructions, stored on at least one of the one ormore storage devices, to specify from the application to the messagingcomponent a particular member of the distributed domain to which toroute data traffic of the application; and program instructions, storedon at least one of the one or more storage devices, to select in theapplication the particular member from members identified in the stateinformation based on the diagnostic information relating to theparticular member.
 18. The computer program product of claim 14, whereinthe program instructions to send the registration and the programinstructions to receive the state information are stored in at least oneof the one or more computer-readable tangible storage devices in a dataprocessing system, and wherein the program instructions to send theregistration and the program instructions to receive the stateinformation are transferred over a network from a remote data processingsystem.
 19. The computer program product of claim 14, wherein theprogram instructions to send the registration and the programinstructions to receive the state information are stored in at least oneof the one or more computer-readable tangible storage devices in aserver data processing system, and wherein the program instructions tosend the registration and the program instructions to receive the stateinformation are downloaded over a network to a remote data processingsystem for use in a computer-readable tangible storage device associatedwith the remote data processing system.
 20. A computer system forimproving a distributed application using diagnostic heartbeating, thecomputer system comprising: one or more processors, one or morecomputer-readable memories and one or more computer-readable tangiblestorage devices; program instructions, stored on at least one of the oneor more storage devices for execution by at least one of the one or moreprocessors via at least one of the one or more memories, to send aregistration from an application to a messaging component in thecomputer system, the registration requesting state information for a setof member components in a distributed domain; program instructions,stored on at least one of the one or more storage devices, to, aftersending the registration from the application to the messagingcomponent, receive the state information at the application from themessaging component, the state information including current status anddiagnostic information relating to the set of member components obtainedfrom diagnostic attributes of diagnostic heartbeat packets received bythe messaging component, wherein a diagnostic heartbeat packet is apacket comprising a header, a set of heartbeat parameters, and a set ofdiagnostic attributes, wherein a basic heartbeat packet is a packetcomprising a second set of heartbeat parameters, a size of the basicheartbeat packet being specified in a heartbeat parameter in the secondset of heartbeat parameters, wherein the set of diagnostic attributes isconfigured to specify a combination of a packet size that is differentfrom the size of the basic heartbeat packet, a protocol being used totransmit the diagnostic heartbeat packet, and a specific bit patternused in the diagnostic heartbeat packet.